Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

zem
Developer emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

[plugin] [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
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

Re: [plugin] [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
From: Toronto Canada
Registered: 2004-05-26
Posts: 60
Website

Re: [plugin] [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
From: Melbourne, Australia
Registered: 2004-02-23
Posts: 8
Website

Re: [plugin] [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
From: Atlanta, Ga.
Registered: 2004-04-04
Posts: 224
Website

Re: [plugin] [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
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

Re: [plugin] [ORPHAN] zem_link

Thanks, Reid. I’ve corrected the post.


Alex
tstate

Offline

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

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

Re: [plugin] [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
From: Hastings, UK
Registered: 2004-08-01
Posts: 25
Website

Re: [plugin] [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
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579
Website

Re: [plugin] [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
From: nevada
Registered: 2004-04-07
Posts: 10
Website

Re: [plugin] [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

Board footer

Powered by FluxBB