Skip to main content
All CollectionsAdvanced Guides
Adjust page settings via source file
Adjust page settings via source file

You can set settings like categories, parent pages, slug etc. from the source file.

Jonas Lindemann avatar
Written by Jonas Lindemann
Updated over a week ago

When to use?

When you want to save time and create multiple pages with different categories or parent pages all in one source file.

LPagery allows you to dynamically set page-specific settings directly from your source file by using Functional Column Headers. This flexibility means you don't have to configure page settings in the LPagery dashboard but can instead control various attributes for each created page individually within the source file. This approach gives you greater flexibility for managing settings like author, status, categories, and more on a per-page basis.

This feature is available for the LPagery Extended plan and above.
Click here to purchase LPagery Pro ->


Author: lpagery_author

Allows you to set the author of the page being created. You can specify the author using their ID, email, or login name.

Examples:

  • By ID: 123

  • By email: user@example.com

  • By login name: admin


Status: lpagery_status

Sets the status of the page. The valid values are:

  • publish: Publish immediately

  • private: Keep the page private

  • draft: Save as a draft

  • future: Schedule for future publishing

"future" requires lpagery_publish_date to be set

Examples:

  • Publish immediately: publish

  • Set as draft: draft

  • Schedule for the future: future (needs to use lpagery_publish_date)


Publish Date: lpagery_publish_date

Sets the publish date when the page status is set to "future". This is useful for dripping content. Dates should be in ISO format.

Example:

  • Scheduled date: 2024-07-31T10:00:00


Parent Page: lpagery_parent

Sets the parent page of the newly created page. You can specify the parent using the post ID or the slug.

Examples:

  • By ID: 25

  • By slug: parent-page


Template: lpagery_template

Defines which template is used for page creation. Specify the template using its post ID or slug.

Examples:

  • Template by ID: 30

  • Template by slug: template-name


Category: lpagery_categories

Assigns categories to the created pages. Categories can be single, multiple, or hierarchical. If a category doesn’t exist, it is created automatically. Currently, LPagery only assigns the last category in the hierarchy directly to the page, but all categories in the hierarchy are still created.

Examples:

  • Single category: news

  • Multiple categories: news|updates

  • Hierarchical categories: top-level>sub-level

Workaround for Assigning All Categories in a Hierarchy:

Per default LPagery will only add the last category in the hierarchy to the page while still creating all others.

To assign all categories from a hierarchy to the created pages, follow these steps:

  1. Initial Setup:

    • In your source file, set the lpagery_categories value as a hierarchy (e.g., {locations}>{city}>{state}).

    • Generate your pages. LPagery will create all categories in the hierarchy, but only the last one (e.g., {state}) will be assigned to the page.

  2. Update for All Categories:

    • Modify the lpagery_categories value in your source file to include all categories explicitly, separated by | (e.g., {locations}|{city}|{state}).

    • Go to Update Pages in the LPagery dashboard and select the page set you created.

    • Choose the Update Content option and upload the updated source file.

    • Confirm the changes to apply the updated categories. All categories in the hierarchy will now be assigned to the pages.

By using this workaround, you ensure that all categories from the hierarchy are properly assigned to the created pages.

We are working on implementing this feature natively into LPagery in the future.


Tags: lpagery_tags

Adds tags to the created page. Tags can be single or multiple, separated by |. Tags are created if they don't already exist.

  • Examples:

  • Single tag: important

  • Multiple tags: important|featured


Custom Taxonomy: lpagery_taxonomy_{taxonomy_name}

Assigns values to custom taxonomies linked to the page. Taxonomies can be hierarchical or non-hierarchical, with multiple values separated by |.

Examples:

  • Custom hierarchical taxonomy: lpagery_taxonomy_region

  • Hierarchical value: region1>subregion

  • Custom non-hierarchical taxonomy: lpagery_taxonomy_topic

  • Non-hierarchical value: topic1


Content: lpagery_content

You can directly define the content of the page from the source file. This is useful if the page's content is primarily data-driven, with or without placeholders.

Examples:

  • Static content: lpagery_content: This is the content of the page.

  • Dynamic content with placeholders: lpagery_content: Hello {name}, welcome to our site!

Did this answer your question?