Introduction
What is a Variable Content Zone?
A page containing a variable content zone can vary its content based on the tags of the screens on which that page is displayed.
Thus, by way of example, a welcome page containing a variable content text zone can display:
- “Welcome to our Paris store” if the screen is tagged [ Paris ]
- “Welcome to our Lille store” if it's tagged [ Lille ]
- “Welcome” on screens untagged or tagged with a different city for which no content has been defined.
In this example, a tag family “Sites” has been used as a reference. Therefore, the content will vary based on the tag of this family applied to a screen.
Second Benefit of a Variable Content Zone: Empowering a Local Editor
To revisit the example mentioned above, a user with limited rights who is themselves tagged Lille will have the right to edit the content of the variable content zone (provided it has been defined as “editable by the user” by the administrator).
Some Other Examples of Possible Uses:
- Varying the price of a product based on the store or a pricing category to which that store belongs.
- Displaying / not displaying an image/text on a page based on whether a store offers a specific service.
- Creating a multilingual page that displays text in the language of the screen on which it is displayed.
Practical Guide: How to Use this Feature?
Let's see how to implement the example below.
Take the example of a fictional client using four tag families to classify their screens, media, content, and users.
First Step: Page Design and Creation of the Variable Content Zone
Let's start by designing a welcome page. The initial steps of creating this page do not differ from the usual page creation process. In this example, we've chosen a background image and created a text zone to contain the variable welcome message.
In the “General Properties of the Zone” panel for the text zone, adjust the “Content Source” parameter to “variable content (based on tags)” and save by clicking on 'Save'.
Next, it's necessary to specify the tag family according to which the content of this zone will vary.
In our example, we want to vary the welcome message based on the store. Therefore, the tag family “Location” will be used as a reference to vary the welcome message on the welcome page. We specify “Location” in the dropdown list.
Second Step: Introducing Content into the Variable Zone
Within the “zone content” panel, it's now possible to choose from a dropdown list for which tag (site) you want to introduce content.
You can define the desired values one after the other. Having just defined “Bordeaux”, we can now customize the message for “Lille”.
The default value is set to “Default Value”, and this is the value that will be displayed in the text zone on a screen that is untagged or tagged with a site for which you haven't defined any content.
Result Obtained in Stores
Default content as no tag on this screen | Default content as no content specified for “Paris” | Specific content for Lille |
Other Types of Zones
In our example, we used a text zone, but all other types of zones also support variable content (image, video, etc.).
Multiple Variable Content Zones on One Page
It's entirely possible to place multiple variable content zones on a single page, whether these zones use the same reference tag family or not.
Practical Guide: How to Empower a Local Editor?
Now that each of our sites can obtain different content in the welcome text zone, let's see how to empower a local user to personalize their message within the variable content zone we've created.
Defining Editable and Non-Editable Zones
In our example, the welcome page has only one text zone. This zone is already editable by users by default. If our page contained other zones, some of which shouldn't be editable by users, you simply need to uncheck the “Editable by users” box in the “General Properties of the Zone” panel.
Creating a Limited Rights User
We will create a restricted “limited rights user” for the “Lille” site so that they can personalize the welcome message for their site.
Section “Users” Button “+” Fill out the form, specifying that it's a “limited rights user.”