Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-04 05:03:39

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

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

#2 2009-08-04 11:36:00

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

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

Board footer

Powered by FluxBB