Multiple page variants
This topic describes how to create variations of a website page and assign each variant a set of rules to determine when it displays on the website in Optimizely Configured Commerce.
Page variants can be used in conjunction with personas and contextual content to deliver a tailored user experience to website visitors in Optimizely Configured Commerce.
All Configured Commerce Content Management System (CMS) pages, including the header and footer, can have page variants.
Add a page variant
To add a page variant, follow the standard procedure for adding a page.
Hover over Show CMS in the upper left corner of the website, then click the Edit that appears.
If this option is not available, check administration rights.
Select Content Tree.
Select the chevron icon next to a page, and select Add Variant.
Assign the Variant Name.
Select the Copy content from current default checkbox to replicate the content and layout from the current Default page, or leave it blank to create a blank page.
Click Continue: Edit Rules.
Assign Variant Rules (see Edit Rules), or select Skip for now to skip this step.
The page appears below its parent on the left toolbar. When the first variant is added to a page, the original page is assigned as the Default. Default pages are noted with a blue D icon, while Variant pages are noted with a blue V icon.
Edit a page variant at the parent level
To edit a page variant at the parent level, select the arrow next to the parent page, and a drop-down of options appear. Select Add Page to add a new page, Add Variant to add a variant page, Edit Shared Fields to edit page information, Reorder Variants to change the sort order of variant pages, or Delete Variants to delete a variant page.
Select Add Page to add a new page to the content tree. This page stands on its own, and does not exist as a parent or variant of any existing pages.
Edit Shared Fields
Select Edit Shared Fields to edit general information about the page group. Change the URL, or select if the pages should Hide from Search Engines, Hide from Site Search, Exclude From Navigation, and Exclude From Sign In Required. Select Save.
The above options cannot be controlled at the variant level.
Select Reorder Variants to change the sort order of page variants. Select a page title and then drag and drop the page to a new position in the list. The page at the top of the list has its rules evaluated first. The page at the bottom of the list has its rules evaluated last. Default variant page rules are not evaluated.
Select Delete Variants to delete all of the parent's variant pages. Once deleted, these pages are removed from the system and cannot be restored with the CMS' Restore this Page option.
Select Delete Variant at the variant level to delete only one variant page.
Publish a Variant Parent
To publish a variant parent, click Publish in the top right corner of the page when the CMS is in Edit mode. Publishing a variant parent pushes any changes made to Shared Fields out to the live site, but does not publish page content. To publish variant page content, access and publish each variant page individually.
Select Restore this Page to restore the variant parent's Shared Fields. Select Show Changes to view changes made between the previous and current versions, then select a version by selecting the radio button. Select Restore to restore the Shared Fields to their previous values, or select Restore & Publish to restore the Shared Fields values and publish changes.
Edit a Page Variant at the Variant Level
To edit a page variant at the variant level, select the arrow next to the variant page, and a drop-down of options appear. Select Edit Variant to edit the page's information, Edit Rules to add page rules, Set as Default to mark the page as the Default page, and Delete Variant to delete the page.
If a page is marked as the Default page, only the Edit Variant option appears.
The page Name cannot be edited.
Select Edit Rules to modify the rules that determine when the variant appears on the website. The resulting pop-up displays the Rules Engine, similar to the rules engine that exists in the Admin Console.
To add a rule:
- Select whether to match Any or All of the following rules using the Any/All drop-down in the upper left corner.
- Select a Rule Type. Additional fields appear based on the selected Rule Type.
- Fill in the additional fields as necessary.
- Determine if additional Rules or Rule Groups should be added. See this article for an in-depth look at Rule Groups.
- Select Save.
Set as Default
Select Set as Default to mark the variant as the Default variant page. When a page is designated the Default page, the live site updates immediately. Because of this, an unpublished page cannot be designated the Default if another variant page is published. Variant page sets can have only one default variant page.
Default pages may still contain rules; however, those rules are not evaluated. If the Default page is changed to a different variant, the original Default variant's rules are evaluated again.
Select Delete Variant to delete the current variant page. Once deleted, page variants are removed from the system and cannot be restored with the CMS' Restore this Page option.
A variant page cannot be deleted while it is designated the Default page.
Publish a variant page
To publish a variant page, select Publish in the top right corner of the page when the CMS is in Edit mode. Publishing a variant page pushes any page content and rules changes to the live site. To publish Shared Fields that apply to all variant pages under one variant parent, access and publish the variant parent separately.
Updated 4 months ago