Fragment links in XDIME 2

You can use attributes on the XDIME 2 meta element to override the link texts defined for layout fragment formats at runtime.

You can use attributes on the XDIME 2 meta element to override the link texts defined for layout fragment formats at runtime.

The meta must precede the element on which you want to override the links, and it is good practice to place it immediately before the element since MCS processes the page as it parses it.

The override is defined in the about attribute with reference to the relevant element identifier.

There are two types of fragment links, each of which may need its own label.

MCS does not process the content of any element that does not belong in the current fragment. It only determines that it does not belong in the fragment and updates the fragment link label if necessary. This means that any labels specified on nested elements will not be processed at all. So you should define labels for all elements with content affecting link text, that may be targeted at a different container.

In the example, the class attributes bind the content to a theme class with the mcs-layout property identifying the layout policy, and the mcs-container property identifying the fragments by the id attributes, with rules like:

.article { mcs-layout: "/sportsnews.mlyt"}
#hockey { mcs-container: "pane3" } 

So you can override the 'hockey' labels in the layout with new content as your lead story changes.

<meta about="#olympics_winter"
  property="mcs:fragment-link-label" content="Winter Olympics Latest"/>
<meta about="#olympics_winter"
  property="mcs:enclosing-fragment-link-label" content="Olympics Contents"/>
<div class="articleGroup" id="olympics_winter">
  ...        
</div>
<meta about="#skiing" property="mcs:fragment-link-label"
  content="Giant Slalom winners"/>
<div class="article" id="skiing">
  <h1 class="headline">Mancuso wins GS Gold</h1>
  ...
</div>
<meta about="#hockey" property="mcs:fragment-link-label"
  content="Ice Hockey Upset"/>
<div class="article" id="hockey">
  <h1 class="headline">Canada loses 2-0 to Russia</h1>
    ...
</div>

The previous example will render fragments as follows:

Related topics