Multidoc Page 16 of 27

soo_multidoc_link

Usage

Generates an HTML anchor element, based on document relationship. Can be used as a single or container tag. Requires individual article context.

<txp:soo_multidoc_link rel="Prev" />
<txp:soo_multidoc_link rel="Next">Continue reading ... </txp:soo_multidoc_link>

When used as a single tag, the text attribute value is used for the link text (see below).

Attributes

Example usage

The navigation links at the bottom of every page of this article are generated by soo_multidoc_link tags. They are in a form called “soo_multidoc”, which is called by my default article form. The “soo_multidoc” form looks something like this:

<ul id="soo_multidoc_prev_next">
<txp:soo_multidoc_link rel="Start" add_title="1" wraptag="li" />
<txp:soo_multidoc_link rel="Contents" wraptag="li" />
<txp:soo_multidoc_link rel="Up" wraptag="li" />
<txp:soo_multidoc_link rel="Prev" wraptag="li" />
<txp:soo_multidoc_link rel="Next" wraptag="li" />
<txp:soo_multidoc_link rel="Download" wraptag="li" />
<txp:soo_multidoc_link rel="Help" wraptag="li">Support</txp:soo_multidoc_link>
<txp:soo_multidoc_link rel="Copyright" wraptag="li">License</txp:soo_multidoc_link>
</ul>

Using wraptag="li" prevents empty list items from being created where the document relationship does not apply, e.g. there is no “Prev” link on the Start page.

Container or single tag

When used as a single tag, soo_multidoc_link uses the rel value as the link text (see example above), unless the add_title attribute is set. In that case you get the article title as the link text:

<txp:soo_multidoc_link rel="next" add_title="1" />

results in:

When used as a container tag, soo_multidoc_link uses the contents of the tag as the link text. In this case, if you set add_title the article title will be added after the tag contents:

<txp:soo_multidoc_link rel="contents" add_title="1">Multidoc: </txp:soo_multidoc_link>

results in: Multidoc: Table of contents

You can use next or prev in combination with another link type:

<txp:soo_multidoc_link rel="prev section" add_title="1">previous section: </txp:soo_multidoc_link>

results in: previous section: Getting started