Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#38 2010-07-21 06:49:09

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

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

#40 2010-07-21 07:48:16

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

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

#43 2010-07-26 03:08:09

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

Re: How to highlight article title ... !?

Very nice … :) … thanks!

Offline

#44 2014-06-24 19:57:54

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

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

#46 2014-06-25 09:17:08

etc
Developer
Registered: 2010-11-11
Posts: 5,255
Website GitHub

Re: How to highlight article title ... !?

GugUser wrote #232187:

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>

Another txp secret I’ve learned. :)

Offline

Board footer

Powered by FluxBB