Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-12-31 13:41:22
- Jan Schulze
- New Member
- Registered: 2006-12-31
- Posts: 1
Problems with txp:if_category and whitespaces
The following code only works, when the category name (in this example “test”) does not contain any whitespaces:
<txp:if_search>
<h3>Search results</h3>
…
<txp:else />
<txp:if_category name=“test”>
<txp:article limit=“5” sortdir=“desc” />
<txp:else />
<txp:article limit=“1” sortdir=“desc” />
</txp:if_category>
</txp:if_search>
When the category name contains whitespaces (e.g. name=“Web Development”, the txp:if_category won’t work. It will always show only one article, regardless of it’s category. I’ve also tried replacing the whitespace with a hyphen (e.g. name=“Web-Development”). The above code is used in a page template and it’s Textpattern 4.0.4. Any clues?
Offline
#2 2006-12-31 13:43:53
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Problems with txp:if_category and whitespaces
Category names are not supposed to contain spaces and are supposed to be lowercase. Titles are the human-friendly names that can hold spaces and other special characters.
Offline