Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
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
Offline
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