Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-01-03 22:44:53

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

A list of article links - but the current one not linked

I’m using article_custom to create a list of links to articles in a specific section (that appears on every article).

What I can’t figure out is how to make the link to the article I am reading… not a link.

This doesn’t work:

<txp:asy_wondertag><txp:if_article_id id="<txp:article_id />"><li class="selected"><txp:title /></li><txp:else /><li><txp:permlink><txp:title /></txp:permlink></li></txp:if_article_id></txp:asy_wondertag>

All links turn out to be ‘true’.

Any ideas?

Offline

#2 2009-01-03 23:03:02

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: A list of article links - but the current one not linked

Take out the <txp:permlink> tags. Why use asy_wondertag – you don’t need it anymore with 4.07….

Offline

#3 2009-01-03 23:14:16

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: A list of article links - but the current one not linked

I assume you are using 4.0.6, because of asy_wondertag? In 4.0.7 you can do this:

<txp:if_article_id>
	<li class="selected"><txp:title /></li>
<txp:else />
	<li><txp:permlink><txp:title /></txp:permlink></li>
</txp:if_article_id>

That said, it’s possible that it doesn’t work because article_custom only displays an article list, and doesn’t recognize the individual article. You could try if it works when you wrap that code in if_individual_article tags, but upgrading to 4.0.7 would be easier :)

Offline

#4 2009-01-04 03:53:54

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

Re: A list of article links - but the current one not linked

Offline

#5 2009-01-04 10:26:40

lozmatic
Member
From: Melbourne, Australia
Registered: 2006-08-27
Posts: 259
Website

Re: A list of article links - but the current one not linked

rvm_if_this_article works perfectly – thanks :)

I hadn’t realised tags can now be embedded in other ones. so long asy_wondertag, you have been a good plugin to me.

Offline

Board footer

Powered by FluxBB