Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
if_article_category behaviour
Hi all
I just noticed today that <txp:if_article_category name=”,thecat”> didnt find article without category set, i have supposed it works like txp:if_category but it seems not.
Is it possible to have the same behaviour regarding putting name=”“ or name=”,onecat” ?
Thanks
Offline
Re: if_article_category behaviour
Hi Rabah
What if you use <txp:if_article_category name='<txp:category />'>
?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: if_article_category behaviour
Hi Yiannis
I try to achieve that <txp;if_article_category name=”, thecat”> will be true if the article have a cetgory named thecat or havent a categroy set at all.
Now it only give me a category named thecat and not the others.
the tag is not working like txp:category.
I dont understund how your code work, the context for my code is in individual article, then <txp:category /> should return nothing in that case.
Offline
#4 2011-11-18 18:34:49
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: if_article_category behaviour
Does this work?
<txp:if_article_category>
<txp:if_article_category name="thecat">
category = 'thecat' -> do something
<txp:else />
category = any category but 'thecat' -> do nothing
</txp:if_article_category>
<txp:else />
no category set -> do something
</txp:if_article_category>
Last edited by els (2011-11-18 18:36:20)
Offline
Re: if_article_category behaviour
Hi Els
Thanks for the code Els, i now that solution that i use in that case, but that need an extra code, what i say is why txp:if_article_category does’nt have the same behaviour as txp:category in this case! it could be useful and consistant.
Cheers
Offline