Is this really the version you are looking for? Kentico Xperience 10 Documentation is no longer updated. Use the switcher in the header to choose your product version.
Kentico allows you to create wizards (opens in a new tab) — pages that guide users through a sequence of steps. A common example of a wizard is the checkout process of an on-line store. You can build wizards using the portal engine and a set of predefined web parts.
You cannot use ASPX templates when creating a wizard or Portal engine sections of ASPX templates, use only the Portal engine.
The wizard uses standard pages to define the steps. You have full control over the step content, and can leverage the features of Kentico pages for every step:
To set up a page wizard on your website:
The page serves as the "parent" of the page wizard and provides a master page for the content of steps. The Page wizard manager ensures the overall logic of the wizard. The Page placeholder represents the area where the wizard displays the content of individual steps.
Tip: If the parent page of your wizard does not have any content of its own, you can redirect visitors to the first wizard step:
To create the wizard steps, add child pages (or other types of pages) under the page containing the Page wizard manager web part. Build the content of steps just like any other portal engine pages.
You also need to configure page nesting for all child pages that you wish to use as steps:
You can choose which child pages to use as steps by configuring the page filtering properties of the Page wizard manager web part. The wizard only loads steps from the first level of direct child pages.
By default, the step order matches the order of the child pages in the content tree. You can use the OrderBy property of the Page wizard manager web part to load the steps in a different order determined by an SQL clause.
Note
If you add, remove or reorder the steps of an existing wizard, you need to restart the application to ensure that the wizard behaves correctly. Open the System application and click Restart application.
Navigation allows users to move between the steps of the page wizard. Add navigation elements using the following web parts:
Web part | Description |
|---|---|
Page wizard button | Displays a button or link that sends users to the previous/next step in the wizard. Choose whether the button leads to the next or previous step when configuring the web part's properties. If you set the Final step URL property of the Page wizard manager web part, the next button also works on the last step in the wizard. When a user clicks the final next button, the wizard redirects to the specified URL. Note: The step transitions only work on the live site and in preview mode. |
Page wizard navigation | Displays an overview of all steps in the wizard. The wizard navigation highlights the current step and allows users to move between steps. You can fully customize the format of the navigation by assigning transformations through the web part's properties. |
You can position the wizard navigation in two different ways:
If you enable the Restrict step order property of the Page wizard manager web part, the wizard forces users to progress through the steps in the defined order. The system tracks which steps individual users have passed through, and stores the information in the HTTP session.
Restricting the step order causes the following behavior:
If the Final step URL property is filled for the Page wizard manager web part, the wizard automatically clears the history of visited steps for users who click the Next button on the last step.
You can create wizards that automatically move users between steps under certain conditions:
In the Pages application, select the page representing the step where you want the transition to occur.
Open the Design tab and add the Page wizard step action web part (anywhere on the page).
Choose the type of step transition in the Action type property:
Enter the macro condition that triggers the step transition into the Action condition property. The condition must return a true or false value.
Click OK.
When a user arrives on the step containing the web part, the system evaluates the action condition. If true, the web part immediately performs the selected step transition.
For example, if you have a step that requires users to log in or register, you can make the wizard skip the step for already authenticated users:
CurrentUser.IsAuthenticatedNote: Automatic step transitions only work on the live site and in preview mode.
Validation rules are a set of conditions that must be fulfilled to successfully complete wizard steps. Validation typically occurs on steps that require users to input data.
The wizard performs step validation:
The step validation requirements depend on the implementation of the web parts placed on the step. If the validation fails, the wizard cancels the step transition and the related web parts display a validation error message.
Tip: If you need to implement custom validation rules for web parts, refer to Connecting web parts with the page wizard.
You can use macro expressions within the context of the page wizard to load the data of steps.
Note: The following expressions are macros, so you need to enclose them in {% ... %} parentheses.
Getting steps:
Getting step data:
For example, you can add the following macro into the Text property of the Page wizard button web part that displays the next step button:
{%
DocumentWizard.CurrentStep == DocumentWizard.LastStep ? "Finish" : DocumentWizard.NextStep.StepData["NodeName"]
%}The macro uses a ternary operator (opens in a new tab) to dynamically set the caption of the Next button: