Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
article_custom and an active tag?
Is it possible to somehow use an active tag with article_custom.
I can’t find a way using the tag itself, just wondering if anyone has a css fix?
Offline
Re: article_custom and an active tag?
By “active tag”, do you mean on an individual article page, if that article is also in the list produced by article_custom
?
Code is topiary
Offline
#3 2009-08-04 15:34:05
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: article_custom and an active tag?
jsoo wrote:
By “active tag”, do you mean on an individual article page, if that article is also in the list produced by
article_custom
?
In that case, you can do something like I did here. I used if_individual_article and if_article_id in order to not display the current article in the article_custom list, but it could easily be adapted to something like this:
<txp:if_individual_article>
<txp:article_custom wraptag="ul" break="">
<li<txp:if_article_id> class="active"</txp:if_article_id>><txp:permlink><txp:title /></txp:permlink></li>
</txp:article_custom>
<txp:else />
<txp:article_custom wraptag="ul" break="li">
<txp:permlink><txp:title /></txp:permlink>
</txp:article_custom>
</txp:if_individual_article>
Offline
Pages: 1