You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Current »

This page describes component personalization, a Magnolia feature that enables adapting the content of a page component to the visitor according to his or her personal preferences, needs and capabilities.  Personalization at the level of page components works along the same principles as page personalization except that its scope is not a page but a component.  (warning) Magnolia 5.4.9+

Component personalization is a feature available only in Magnolia EE Professional.

 (warning) 5.4.12+. You can personalize a page and its components at the same time. The feature is disabled by default. To enable it, set /modules/personalization-components/config/allowNestedVariants to true.

Personalizing a component

Component personalization is possible through the following actions in the Component action bar:

  • Add component variant
  • Choose audience
  • Hide/Show original
  • Delete component variant
  • Delete all component variants

Adding a variant

If the selected component hasn't been personalized yet, only the Add component variant option will be available:

   

 To add a new variant to a component select the Add component variant . A new pull-down menu will appear in the component's top bar together with the variant icon  placed next to the menu: 


If not associated with any target audience, the newly added variant of the component will be named automatically by Magnolia ("VARIANT-0"). Once the target audience is defined and associated with the variant, the name of the audience will be displayed in place of the automatically generated name. The original component content will be renamed and accessible under the "ORIGINAL" option in the pull-down menu. This version of the component will be displayed to page visitors if no audience trait can be matched with the personalization properties assigned to the other variant(s) of the component.

Adding a variant to a component will affect its publishing status as well as the publishing status of its parent area and parent page: all of these are will be changed to "modified" (yellow) because creating a variant is considered an edit action on the component.

The fact that a page has content variants for some of its components, e.g. the page below called "maps-download" included in the documentation-tutorial-module, is marked by the variants icon appearing in the top bar of the page in the Edit and Preview views, and by the same icon placed also next to the name of the page in the page tree view:

Choosing an audience

Select the Choose audience option in the Action bar to choose the target audience for a component variant. Selecting a component variant is a prerequisite to choosing an audience for the variant.

(warning) it is not possible to choose an audience for the "Original" version of the component.

Hiding the original

The "ORIGINAL" content of a component can be marked as "ORIGINAL – HIDDEN". When marked as hidden, the content associated with the "ORIGINAL" will only be visible in the page Edit view.  

Why hide the original? Hiding the original can be useful in a scenario in which the content is exclusive, targeting a particular audience. If no variants match, the original (fallback) content will be hidden. To hide/show the content of a component, select the Hide/Show original option in the Action bar.

Changing the template of a personalized component

As of Magnolia 5.4.12+ you can serve different content to different audiences by changing the template used in a personalized component. This enables you to serve text to one audience, an image to another audience, video to a third audience and so on. To change the template of a component variant, click Change template in the Action bar and in the next dialog choose the template you wish to apply to the actual component variant:

Deleting a variant or all variants

There are three ways in which a variant may be deleted:

  1. Select the component variant that is to be deleted in the variant pull-down menu and click on Delete component variant.
  2. Delete all component variants.
  3. Delete the component itself. However, in this case also any other variant of the component will be deleted as well. This deletion can only be undone by restoring an earlier version of the page.

After the deletion of the component the publishing status of the parent area and the parent page will change to modified (yellow) because deleting a component is considered an edit action on the page.  

Restricting component personalization

Personalization of page components is by default allowed in Magnolia EE Pro but it may be altered in two ways:

  • By disabling it in the component's template, see the personalizable property in component properties .
  • By restricting it to a specific user role (e.g. superuser only) in an area template. See the personalize action of the area template which sets the availability of the component for that particular area.
#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels