#1 2004-07-12 01:44:10

zem
Developer emeritus
omega
Real name: Alex
From: Melbourne, Australia
Website

[ORPHAN] 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

Download:

http://vigilant.tv/documents/tp/zem_link-0.3.txt

Last edited by zem (2004-10-16 02:22:57)


Alex
tstate

Offline

 

#2 2004-07-12 02:07:52

zem
Developer emeritus
omega
Real name: Alex
From: Melbourne, Australia
Website

Re: [ORPHAN] zem_link

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

 

#3 2004-07-12 19:13:24

Daragh
Member
delta
Real name: Daragh Sankey
From: Toronto Canada
Website

Re: [ORPHAN] zem_link

You have pre-emptively solved a problem I had been meaning to complain about, namely the rigidity of the permalink title field. Thanks!

Offline

 

#4 2004-07-13 01:48:28

indent
New Member
alpha
Real name: Justin French
From: Melbourne, Australia
Website

Re: [ORPHAN] zem_link

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

 

#5 2004-07-16 17:29:50

reid
Member
êta
Real name: Reid Stott
From: Atlanta, Ga.
Website

Re: [ORPHAN] zem_link

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

 

#6 2004-07-17 00:52:37

zem
Developer emeritus
omega
Real name: Alex
From: Melbourne, Australia
Website

Re: [ORPHAN] zem_link

Thanks, Reid. I’ve corrected the post.


Alex
tstate

Offline

 

#7 2004-09-14 16:01:12

jonhicks
Member
thêta
Real name: Jon Hicks
From: Oxfordshire UK
Website

Re: [ORPHAN] zem_link

Thanks Zem – this is really useful in over coming the ‘does all the XHTML for you’ nature of the permalinks. Cheers!


Cheers,
Jon VC#9

Offline

 

#8 2004-09-21 18:33:09

charlesroper
Member
beta
Real name: Charles Roper
From: Hastings, UK
Website

Re: [ORPHAN] zem_link

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

 

#9 2004-09-21 22:21:05

zem
Developer emeritus
omega
Real name: Alex
From: Melbourne, Australia
Website

Re: [ORPHAN] zem_link

I don’t know, to be honest. I just downloaded it and was able to install v0.2 via both methods.

Can you install other plugins?


Alex
tstate

Offline

 

#10 2004-09-22 04:53:31

mrjerz
Member
beta
Real name: mrjerz
From: nevada
Website

Re: [ORPHAN] zem_link

Same issue here. I tried installing Ramanan’s word count plugin, and got the same message? Any idea?


I amaze myself with my inability to grasp simple concepts.

Offline

 

Powered by PunBB
© Copyright 2002 – 2005 Rickard Andersson