Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#37 2010-07-21 00:29:49
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: How to highlight article title ... !?
A nice solution. It really works?
It seems to me that this part of the code contains an error:
<txp:article limit="1" sort="position asc"><txp:article_id /></txp:article_custom>
Offline
Re: How to highlight article title ... !?
Ah, yes, the code isn’t correct … but it does work!
Offline
#39 2010-07-21 07:37:07
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How to highlight article title ... !?
RedFox wrote:
… but it does work!
Funny that it works. Still, you’d better change it ;)
Offline
Re: How to highlight article title ... !?
I did!
PS
Els, I suppose you like sudokus as well … ;-)
Offline
#41 2010-07-21 16:14:06
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: How to highlight article title ... !?
RedFox wrote:
I suppose you like sudokus as well … ;-)
Nope, never even tried one :) And as long as this forum exists I don’t think I’ll need to ;)
Offline
#42 2010-07-25 20:32:41
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: How to highlight article title ... !?
Because the article IDs are compared, the double solution for individual articles and article lists is not necessary. The code can be more simple:
<txp:category_list categories="inclusief,optioneel" break="">
<h4><txp:category /></h4>
<txp:article_custom section="info" category='<txp:category />' sort="position asc" wraptag="ol" class="titles">
<li<txp:if_article_id id='<txp:article limit="1" sort="position asc"><txp:article_id /></txp:article>'> class="active"</txp:if_article_id>><txp:permlink><txp:title /></txp:permlink></li>
</txp:article_custom>
</txp:category_list>
Offline
Re: How to highlight article title ... !?
Very nice … :) … thanks!
Offline
Re: How to highlight article title ... !?
See this post why the last snippet in this thread of @GugUser can be refined into a more database friendly one … :)
Last edited by RedFox (2014-06-24 20:00:26)
Offline
#45 2014-06-24 21:54:03
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: How to highlight article title ... !?
I have also learned over the past four years …
Offline
Offline