Documentation Center

Components that link to the same Component

A Component is often used on multiple Web pages and rendered with different Component Templates to produce different Component Presentations. Typically, you want the shorter Component Presentation to link to the longer one. To implement this, set the Priority of the Component Templates involved.

For example, an article may be presented in two different ways:

  • It may appear on a summary page that shows just the title of the Component, a short summary, and a "Read more" link
  • It may appear on a full article page that shows the full content of the Component.

While in both cases, the content is derived from the same Component, in each case, the Component is combined with a different Component Template. In this situation, you want the "Read more" link to point from the summary to the full article.

Typically, "Read more" links are generated by Component Templates and are not part of the original Component. The priority of the Component Template ensures that the "Read more" link directs visitors to the Page which contains the full article.

In this example, the summary article Component Template would be assigned a priority of Low, while the full article Component Template would be assigned a priority of High. The Dynamic Link Resolver determines what Component Presentation to link to by using the priority of the Component Template.

A special case of a Component linking to itself is when not only the source and target Component are the same, but also the source and target Component Presentation. In this situation, two different Pages contain the same Component rendered with the same Component Template. In this situation, both Component Presentations could end up pointing to each other; that is, to exact copies of themselves, but on another Web page. Most likely, you do not want this to happen. You can prevent this by explicitly excluding Component Presentations as a possible target if they were rendered with the same Component Template as the source. The GetLinkAsString method has a parameter for just such a situation.