Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
txp:if_category?
<txp:if_category name="About">
<div id="menuin2">
<txp:else />
<div id="menuin">
</txp:if_category>
Should that code output <div id=“menuin2”> if the category is “About” and <div id=“menuin”> if it is not?
It doesn’t :( it just outputs <div id=“menuin”> whatever the category.
Help
Offline
Re: txp:if_category?
try lowercasing the category name
Offline
Re: txp:if_category?
ha ha – cool – that’s fixed all my problems :)
Thats wierd – when I was making the site using a url like http://23.45.85.2/~name/index.php – everything worked, yet as soon as the domain propagated – the conditional categories stopped working.
Also my actual category names are About, Contact etc – but in the wiki it says “Attributes – Tag will accept the following attributes (case-sensitive)”
So I wonder why Ruud’s suggestion worked?
Offline
Re: txp:if_category?
I’m not complaining BTW – thanks Ruud :)
Offline
Re: txp:if_category?
Using capitals for things that may appear in the URL, such as categories or sections (just the “name” not the “title”), can cause problems. It’s not a TXP thing just a general problem that can be a PITA.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: txp:if_category?
Thanks Stuart – at least I know for the future
Offline
Pages: 1