Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-29 02:20:10

hidalgo
Member
From: Australia
Registered: 2008-02-05
Posts: 77
Website

Tag request: txp:link_id

I’m hoping there is interest in adding the <txp:link_id /> tag for use within <txp:linklist />.

This can be used to attach unique hooks to links. More obscurely, it can also be used to utilize the link’s ‘Sort Value’ (another missing tag) within a <txp:linklist /> e.g. <txp:wet_linkinfo id='<txp:link_id />' type="linksort" />.

The addition of this tag would also be consistent with <txp:file_download_list /> / <txp:file_download_id />.

Offline

#2 2009-05-29 02:39:26

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: Tag request: txp:link_id

Are you asking that the option be added to the core, or made available as a plugin?

a plugin is fairly simple:

function ras_link_id($atts)
{
      global $thislink;
      assert_link();
 		return $thislink['id'];
}

Offline

#3 2009-05-29 02:58:59

hidalgo
Member
From: Australia
Registered: 2008-02-05
Posts: 77
Website

Re: Tag request: txp:link_id

rsilletti wrote:

Are you asking that the option be added to the core, or made available as a plugin?

Thanks Rick, I’m hoping it will be added to the core.

Offline

#4 2009-05-29 03:45:42

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: Tag request: txp:link_id

Tags as attributes may make this worth considering IMHO, a patch has been submitted.

Offline

Board footer

Powered by FluxBB