Create article plinks and absolute href links (0.4)
<txp:zem_link> creates links. It works as a replacement for txp:permlink, and it can also be used to create direct links to articles, pages and external web sites. Some examples:
<txp:zem_link>foo</txp:zem_link>
In an article form, works the same as txp:permlink
<txp:zem_link title="permanent link to '%s'">foo</txp:zem_link>
Same as txp:permlink, except with a title attribute. The optional ”%s” will be replaced with the article title.
<txp:zem_link href="25">foo</txp:zem_link>
Direct link to article #25. In clean URL mode, the URL title will be appended. If a “title” attribute is supplied, it works the same as for a permanent link, with ”%s” replaced with the article title.
<txp:zem_link href="foo/">foo</txp:zem_link>
Creates a link relative to the textpattern root.
<txp:zem_link linkid="15">foo</txp:zem_link>
Direct link to link #25. If no “title” attribute is supplied, the link description field is used.
As of version 0.3, it’s possible to use zem_link as a self-closing tag in certain circumstances:
<txp:zem_link href="25" />
Direct link to article #25. The article title will be used as the link text.
<txp:zem_link linkid="15" />
Direct link to link #15. The link name field will be used as the link text.
All of the above forms support the following attributes:
href – the URL or article ID, as described above.class – CSS class name. Optional.target – link target. Optional.title – link title. Optional. ’%s’ may be used in links to article and link IDs, to include the article title or link description.
28 November 2004, 10:39 by Alex ·
Commenting is closed for this article.