Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
if_category to show 1 or 2 categories
Hello all,
I like to show which categories I have assigned to an article and when I have 2 categories assigned I separate them with a + sign, this works. But when I only have 1 category assigned to an article I like the + sign not to be visible. I tried something with <txp:if_article… but never managed. Is there anybody who could help me out?
The example, see the extra “+” sign at “Blog entry4…”
My code:
<txp:category1 link="1" title="1" section="blog" this_section="1" /> + <txp:category2 link="1" title="1" section="blog" this_section="1" />
Many thanks already for any pointers :-)
Jeroen
Last edited by JeroenC (2010-04-23 08:43:14)
Time to volunteer? Come and join us at a great project which is going to be opensource: https://www.caloom.com
Offline
Re: if_category to show 1 or 2 categories
<txp:if_article_category number="2">
+
</txp:if_article_category>
And then just use number 1 as primary and 2 as secondary.
Offline
Re: if_category to show 1 or 2 categories
:-D
It works!
Fantastic, many thanks
Jeroen
Time to volunteer? Come and join us at a great project which is going to be opensource: https://www.caloom.com
Offline
Pages: 1