You are not logged in.
<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:
Download:
http://vigilant.tv/documents/tp/zem_link-0.3.txt
Last edited by zem (2004-10-16 02:22:57)
Alex
tstate
Offline
Whoops – <code><txp:zem_link><txp:title /></txp:zem_link></code> didn’t work as expected. Fixed. Also corrected some errors in the help text.
Last edited by zem (2004-07-12 02:22:27)
Alex
tstate
Offline
Very cool Zem. I’m going to take this a bit further and allow it to customise the format of the permlink (since I’m working on other hacks and rewrite rules for parsing such URLs). Will supply you with my mods once complete, but they’re obviously not going to be all that magic :)
Last edited by indent (2004-07-13 01:49:13)
VC#72, waiting patiently for /section/category/article-title/ based URLs :)
Offline
Thanks for that plug-in. As others have mentioned, it fixes one of those irritating little things that had been bugging me. One note about your suggested code:
<pre><code>
<txp:zem_link title=“permanent link to ‘%s’” />linktext</txp:zem_link>
</code></pre>
The closing slash in your opening tag causes TXP to close the link tag before it is wrapped around the link text. But this worked for me:
<pre><code>
<txp:zem_link title=“permanent link to ‘%s’”>linktext</txp:zem_link>
</code></pre>
TextPattern user since 04/04/04
Offline
It says “badly formed or empty plugin code” when trying to install. I’ve tried both the old-style import and the new-style cut and paste. What am I doing wrong?
Last edited by charlesroper (2004-09-21 19:28:46)
Charles Roper
Offline