Content last modified Monday 6 March 2017
hop to #bottom
Current version:
About It:
Get it:
Rate it:
  • Helpful?
  • 2 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!


<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 and pages. <txp:zem_link>linktext</txp:zem_link>

In an article form, works the same as txp:permlink

<txp:zem_link title="permanent link to '%s'">linktext</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" />linktext</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/">linktext</txp:zem_link>
Creates a link relative to the textpattern root.

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:

*update: wet_link processes zem_link tags as well

Article Request Count:
Initially released:
Posted here:
22 Nov 2004
Article modified:
03 Mar 2017

If there is a comment form at the Information URL, you may want to leave your comments/questions there or at the Forum thread for quicker feedback. Otherwise, comment away:

Commenting is closed for this article.

Commented (5)

To whom it may concern: i’ve installed zem_link 0.3 and used txp:zem_link href=”ID” successfully on an RC3 install.
just a word to those trying to keep xhtml standards, target is no longer supported by xhtml 1.0..
I got the article’s title repeated in the href by id link: would become

I fixed this by commenting out:

//if ($url_mode==1) $url = $url . (empty($rs[“url_title”]) ? stripSpace($rs[“Title”]) : $rs[“url_title”]);

It’s a very nice plugin, thank you :-)
Please note that zem_link has experienced several updates which are not reflected if you download this plugin from the download URL given above. See the forum thread for details.

Part of this plugins’ functionality is supported in the core (v.4.0.4).

TextBook: permlink

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

Would you care to write a comment or visit the forum discussion?

You know you want to visit the Archives.




There are also tag clouds, 'cause those are fun.
Published with Textpattern