+

Search Tips   |   Advanced Search

Create an alternate design tag

We use an alternate design tag to display a different component based on whether the item being returned by a menu or navigator is on the current path or not.

The format of an alternate design tag:

    [alternatedesign highlight=" " normal=" " type=" " start=" " end=" " ]

To create an alternate design tag:

  1. Click Insert a Tag from a navigator or menu design field. The Tag Helper dialog opens.

  2. Select Alternate Design as the tag type.

  3. Select a component to use when displaying items not on the current path in a navigator or menu design. This would typically be a text or HTML component containing the code used to display a navigator or menu result, such as a placeholder tag. This is added to the tag as the normal=" " parameter.

    If we select type="parent" or type="any" in step 5, the highlighted design is used by all the site areas in the current item path.

  4. Select a component to use when displaying items on the current path in a navigator or menu design. This would typically be a text or HTML component containing the code used to display a navigator or menu result, such as a placeholder tag. This is added to the tag as the highlight=" " parameter.

  5. Select whether to apply the alternate design tag to the current content item, the parent site area, or any item being returned by a navigator. This is added to the tag as the type=" " parameter.

    • When adding an alternate design to a menu design, only select type="current" or type="any" because site areas cannot be displayed in menus.

    • When adding an alternate design to a navigator design, only use type="current" if the navigator has been configured to display content items.

  6. Click OK to add the tag to your navigator design.


What to do next

Once we have added the tag to the design, we can also add the following parameters to the tag:

Tag parameters Details
normal=" " To use the library specified in the URL of the current page, use normal="./name"

If we specify normal="./name", the library name does not appear in the presentation template or element design. The actual path is not resolved until the item is rendered.

highlight=" " To use the library specified in the URL of the current page, use highlight="./name"

If we specify highlight="./name", the library name does not appear in the presentation template or element design. The actual path is not resolved until the item is rendered.

start=" "

end=" "

The Start and End attributes are used to wrap the data returned by a tag within other tags, such as HTML. These attributes are not mandatory.

Displaying different code for content items and site areas:

To display different code when returning content items or site areas in a menu or navigator we need to use two alternate design tags. One for the content items and one for the site areas. For example:

[AlternateDesign highlight="./currentsiteareacomponent" normal="./othersiteareacomponent" type="sitearea"]
[AlternateDesign highlight="./currentcontentcomponent" normal="./othercontentcomponent" type="content"]


Parent Create web content tags