Variations can be used in a number of ways, for example to reformat content for devices like smartphones and tablets, or specific output for groups of logged in users. See Mobile for a full discussion of the example smartphone variation used in the demo sites and Channels for more information about this core functionality.
Variations are typically configured in the site definition, but can also be configured on a template level in the template definition. See how a variation is used to disable the
stage area for smartphones.
4.5.3+ In a page template, you can configure a variation that is triggered by the page URL extension. This type of variation cannot be configured in the site definition. In this example, the
newsletter variation disables the
base areas, leaving only the main content. You could use such a variation for an online version of a newsletter or a printable version of a page.
If you request content on any page based on the
stkSection template and change the extension from
.newsletter the variation content is served.
You can combine this with the
smartphone variation configured in the site definition by adding the
?mgnlChannel=smartphone URL parameter to serve the
newsletter variation in a format suitable for smartphones.
Be careful about using variations to restrict content to specific user groups. Simply changing the URL extension allows other users to see the content. Variation is not a secure mechanism. If used for sensitive content, consider extending
DefaultRenderableVariationResolver to provide additional security measures.