Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Styling a link to the 'current' article
I’m using the following code to list linked thumbnails of articles in a category:
http://raymond.kw-wu.com/weddings/michelle-james/1/
Code I’m using is:
<txp:if_article_category><txp:permlink class=“thumb”><txp:article_image class=“thumbnail” thumbnail=“1” /></txp:permlink></txp:if_article_category>
I would like to add a condition so that the thumbnail of the article that is being viewed by the user has another style applied to it.
There is the if_article tag, but it appears that one must include a hard coded article ID.
Any suggestions?
Thank you very much.
Lawrence
Offline
Re: Styling a link to the 'current' article
OK, got this working thanks to the wonderful cch_custom_article (http://www.cokesque.com/code/42/chharticlecustom-plugin)
Offline
Re: Styling a link to the 'current' article
Actually, I lied. I got something else working with that wonderful tag.
But I think I know how to do this using another awesome plugin… hehe.
(Don’t mind me talking to myself)
Offline
Re: Styling a link to the 'current' article
OK, here’s the problem…
I can use a plugin to give a conditional tag (eg. if_article_id) an article ID dynamically. But since all this happens in a form that is called by an article list tag I actually get values for ALL articles generated in the list ( In the example above it’s: 1 2 3 4).
Any alternatives to this method? I tried using <txp:if_individual_article> but that didn’t work.
The ideal solution would be an ‘active_class’ type property for the article_image tag.
Offline
Re: Styling a link to the 'current' article
The solution exists. It is easy and was mentioned in a post not very long ago. Arghh.
rvm_if_this_article
I am a very happy person.
Offline