Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2010-11-05 18:07:27
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: category1 & category2 attributes for article_custom tag
When used as a container tag it always turns whatever is contained into a link. So all you need to do is remove the container.
Offline
#17 2010-11-08 08:37:56
- fantasmo
- Member
- Registered: 2010-05-05
- Posts: 40
Re: category1 & category2 attributes for article_custom tag
Ah ok, thank you. (I thought I could turn it off, because textbook gives me the “link”-attribute)
But one little thing still is: I need this “and” only if an article appears in two categories. I believe I need an “if-statement” or something to do this…but I was happy (i’m not a txp-pro) to find the “category2”-container which can do that except that I don’t want it as a link.
(For the first “category1” I already have it as just <txp:category1 />)
Offline
Re: category1 & category2 attributes for article_custom tag
fantasmo wrote:
But one little thing still is: I need this “and” only if an article appears in two categories.
<txp:if_article_category number="2">
<!--
We have category2.
-->
</txp:if_article_category>
See if_article_category.
Offline
#19 2010-11-08 13:04:30
- fantasmo
- Member
- Registered: 2010-05-05
- Posts: 40
Re: category1 & category2 attributes for article_custom tag
Oh, great that works…and wasn’t even that complicated ;-)
Offline
#20 2010-11-08 17:57:31
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: category1 & category2 attributes for article_custom tag
fantasmo wrote:
(I thought I could turn it off, because textbook gives me the “link”-attribute)
It is mentioned on the Textbook page:
When used as a containing tag, it will turn the contents into a link to that category.
but I agree it can easily be overlooked. So I added a note in the attribute’s description. Thanks for pointing it out!
Offline
Re: category1 & category2 attributes for article_custom tag
In 4.6 <txp:article(_custom) /> accepts match attribute:
<txp:article_custom category="cats,dogs" match="Category1" ... />
with match="Category1,Category2" by default.
Offline