This is the early access documentation preview for Custom Views. This documentation might not be in sync with our official documentation.
Using Dynamic pages
The Dynamic pages area lets you manage the page versions and the dynamic page rules for the dynamic pages of your website.
From the Dynamic pages area, you can:
- Create and manage the page versions associated with your dynamic pages.
- Create and manage the dynamic page rules for your dynamic pages.
Page versions
Create a page version for a dynamic page
To create a page version for a dynamic page, follow these steps:
From the Studio home page or from the left menu, go to Dynamic pages.
From the dynamic page list, select the dynamic page for which you want to create a page version: the Dynamic page rules and Page versions panes open.
Optional: From the Dynamic page rules pane, add a data source filter for the page preview.
Optional: From the Dynamic page rules pane, create, edit, or duplicate a dynamic page rule.
From the Dynamic page rules pane, in the Page rules section, select the page rule with which you want to associate the page version.
In the Page versions pane, click + New page version: the Create page version dialog opens.
In the Create page version dialog, do the following:
In the Page version name field, enter the name of the page version. Make sure to choose a relevant name so that it will be easy to find the page version in the future.
From the Layout drop-down, select a layout or a page template.
To display the page version for specific locales only, select the locale(s) from the Locale drop-down: the page version will be visible for all selected locales. Otherwise, leave the Locale field empty.
The Locale drop-down is displayed only for projects with more than one locale.
To handle advanced filtering based on locale, enter a FECL expression in the Custom field. For example, to display the page version for all locales except
de_CH
, enterlocale != "de_CH"
.To make the page version the default, select the checkbox.
Click Save: the page builder opens.
Edit the page version as desired. You can preview it if you added a data source filter for preview in the earlier steps.
Click Save or select the saving option from the drop-down. Then, click the back arrow to return to Dynamic pages.
To display the page version on your website, you must make it live from the More menu.
Edit and manage a page version for a dynamic page
After creating a page version for a dynamic page, you may need to edit or manage it. For example, to change a layout element, to make the page version live, or to delete it. To do so, follow these steps:
From the Studio home page or from the left menu, go to Dynamic pages.
From the dynamic page list, select the dynamic page for which you want to edit/manage the page version: the Dynamic page rules pane opens.
In the Page rules section, select the page rule with which the page version is associated.
In the Page versions pane, expand the section where the page version is located.
Hold the pointer over the page version and do one of the following:
- Click the Edit icon to open the page builder and edit the page version's layout.
- Click the More icon to perform other management actions.
Preview a page version for a dynamic page
When creating or editing a page version for a dynamic page, you may find it useful to preview the page version. To display the preview, you must add a data source filter for preview to the dynamic page.
A data source filter lets you configure the filtering parameters to retrieve data from a data source. You can add and edit a data source filter only for the data source that is set in the dynamic page's schema. The available filtering parameters depend on the data source configuration.
Let's say that in the schema of your Product search dynamic page, your development team sets the Products data source, which retrieves data from your product catalog. And let's assume that the data source configuration contains the Minimum price and Maximum price fields. In this case, you can add and edit the data source filter for the Products data source. For example, you can configure the filter to retrieve products that cost a minimum of 10 Euros and a maximum of 100 Euros.
Add a data source filter for page preview
To add a data source filter, follow these steps:
From the Studio home page or from the left menu, go to Dynamic pages.
From the dynamic page list, select the dynamic page to which you want to add a data source filter: the Dynamic page rules pane opens.
In the Data source for preview section, click Add data source: the data source filter editor opens.
Optional: Edit the filter's parameters.
Click Save: the data source filter appears in the Data source for preview section.
Edit a data source filter for page preview
To edit a data source filter, follow these steps:
From the Studio home page or from the left menu, go to Dynamic pages.
From the dynamic page list, select the dynamic page for which you want to edit the data source filter: the Dynamic page rules pane opens.
In the Data source for preview section, click Edit data source: the data source filter editor opens.
Edit the filter's parameters.
Click Save.
If you edit the data source filter while the preview is open, the preview will not update with the new data.
Dynamic page rules
Create a dynamic page rule
You can create a dynamic page rule only if the + New rule button is available in the Dynamic page rules pane. The button displays if in the dynamic page schema the isMultiple
field is set to true
. Consult with your development team if you need to change the configuration in the schema.
To create a dynamic page rule, follow these steps:
From the Studio home page or from the left menu, go to Dynamic pages.
From the dynamic page list, select the dynamic page for which you want to create a page rule: the Dynamic page rules pane opens.
Click + New rule: the Create dynamic page rule dialog opens.
In the Create dynamic page rule dialog, do the following:
- In General settings > Name, enter the name of the rule.
- In Entity rules > Entity criterion, enter the FECL expression.
- In the Data source section, click + Add data source filter and select the data source to get data from: the data source filter editor opens. Configure your data source filter and click Save to return to the Create dynamic page rule dialog.
- Set the configurations for the other sections.
Click Save.
If, for the same dynamic page, you set different page rules with the related page versions and an item matches the criteria of multiple rules, it is not possible to determine which page version displays on your website.
Edit a dynamic page rule
To edit the settings of a dynamic page rule, follow these steps:
From the Studio home page or from the left menu, go to Dynamic pages.
From the dynamic page list, select the dynamic page for which you want to edit the dynamic page rule: the Dynamic page rules pane opens.
In the Page rules section, select the dynamic page rule to edit.
Click the Settings icon: the Dynamic page rule settings dialog opens.
In the Dynamic page rule settings dialog, edit the settings as desired. For example:
- In General settings > Name, edit the name of the rule.
- In Entity rules > Entity criterion, enter or edit the FECL expression.
- In the Data source section, edit or delete an existing data source filter or add one from the data source filter editor.
Click Save in the Dynamic page rule settings dialog.
When you edit a dynamic page rule, the new settings are applied to all the related page versions.
Duplicate a dynamic page rule
If you want to create a dynamic page rule from an existing one, you can duplicate the latter. To do so, follow these steps:
From the Studio home page or from the left menu, go to Dynamic pages.
From the dynamic page list, select the dynamic page for which you want to duplicate the dynamic page rule: the Dynamic page rules pane opens.
In the Page rules section, select the dynamic page rule to duplicate.
Click the Duplicate icon: the Save new dynamic page rule as draft dialog opens.
In the Save new dynamic page rule as draft dialog opens, edit the duplicated settings as desired. For example:
- In General settings > Name, edit the name of the rule.
- In Entity rules > Entity criterion, enter or edit the FECL expression.
- In the Data source section, edit or delete an existing data source filter or add one from the data source filter editor.
Click Save in the Save new dynamic page rule as draft dialog.
You cannot duplicate the default dynamic page rule.
When you duplicate a dynamic page rule, the related page versions are duplicated too.
The page versions in the Archived section are saved in the Archived, while the page versions in the other sections are saved in the Draft section for the new rule.
Delete a dynamic page rule
To delete a dynamic page rule, follow these steps:
From the Studio home page or from the left menu, go to Dynamic pages.
From the dynamic page list, select the dynamic page for which you want to delete the dynamic page rule: the Dynamic page rules pane opens.
In the Page rules section, select the dynamic page rule to delete.
Click the Delete icon: the Delete dynamic page rule? dialog opens.
In the text box, enter
DELETE
.Click Delete.
Once you delete a dynamic page rule, you will no longer be able to access either the rule or the page versions that were associated with it.
You cannot delete the default dynamic page rule.