Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
0.4
About It:
Get it:
Rate it:
  • Helpful?
  • 2 Yes
  • 0 No
Flag it:
Contact Reason [ ? ]

zem_link

<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:
href
class
target
title

*update: wet_link processes zem_link tags as well

Article Request Count:
Initially released:
2004-07-11
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:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

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.
Lance:
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: http://fastseduction.lavadots.com/article/9/one-itis would become http://fastseduction.lavadots.com/article/9/one-itisone-itis

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.

Browse

Categories


Articles

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