Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2010-07-20 19:46:35

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

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

“Sorry” … !? You’re doing a great job … please, you’re my saviour … don’t be sorry. Btw … you’re responding time is very fast … je lijkt ‘de overtoom’ wel … ;-)

Offline

#32 2010-07-20 19:48:14

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

:) Did you notice I added something to my previous post?

Offline

#33 2010-07-20 20:04:41

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

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

Eh … well … <txp:category /> did the trick … ;-)

And with this >

… it’s perfect!

Thank you so much. It sure is an intelligent peace of code … :)

<txp:category_list categories="inclusief,optioneel" break="">
   <h4><txp:category /></h4>
   <txp:if_individual_article>
      <txp:article_custom section="info" category='<txp:category />' sort="position asc" wraptag="ol" class="titles">
         <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 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_custom>'> class="active"</txp:if_article_id>><txp:permlink><txp:title /></txp:permlink></li>
      </txp:article_custom>
   </txp:if_individual_article>
</txp:category_list>

Last edited by RedFox (2010-07-20 20:06:56)

Offline

#34 2010-07-20 20:08:59

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

RedFox wrote:

And with this >

… it’s perfect!

Hey, it should be the other way around: section and category names should be all lowercase, titles can have capitals. And then use <txp:category title="1" />.

Last edited by els (2010-07-20 20:09:53)

Offline

#35 2010-07-20 20:11:10

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

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

I’ve tried, but it doesn’t work … or am I missing something here?

[edit]
With <txp:category title="1" /> it’s ok … :) … thanks again!

Last edited by RedFox (2010-07-20 20:16:11)

Offline

#36 2010-07-20 20:18:02

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

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

Sorry, I shouldn’t keep editing my posts ;)

Offline

#37 2010-07-21 00:29:49

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,477

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: 816
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: 816
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,477

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: 816
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: 816
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,477

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

I have also learned over the past four years …

Offline

Board footer

Powered by FluxBB