Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-01-16 02:48:37
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Category List Question
I know I am probably overlooking the obvious, but for whatever reason, I am not able to limit the articles that someone sees when they select a category from my category list.
Right now on my page I have the following:
<txp:category_list sort="name" section="article" wraptag="ul" break="li" />
This works like a charm.
The problem is that when you select any of the categories, it lists all the articles, and does not limit them to the articles in that particular category.
The code I have on the page to display the articles is:
<txp:if_individual_article>
<txp:article pgonly="0" />
<br />
<div class="previouspost">
<txp:link_to_prev><< Previous: <txp:prev_title /></txp:link_to_prev>
</div>
<br />
<div class="nextpost">
<txp:link_to_next>Next: <txp:next_title /> >></txp:link_to_next>
</div>
</txp:if_individual_article>
<txp:if_article_list>
<txp:article_custom pgonly="0" section="article" form="excerpt"/>
<br />
<p>
<txp:older><< Previous</txp:older>
<txp:newer>Next >></txp:newer>
</p>
</txp:if_article_list>
I have tried several variations using “if” statements, but for whatever reason I can only get bits and pieces to work.
I know I am making this more difficult than it has to be.
Any assistance would be greatly appreciated.
progre55
Offline
#2 2008-01-16 11:34:47
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Category List Question
Use <txp:article />
instead of <txp:article_custom />
. The latter is not context sensitive, so it doesn’t ‘know’ it’s a category page.
Offline
#3 2008-01-16 11:39:18
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Category List Question
It is because you are using article_custom. You want something like:
<txp:if_individual_article>
<txp:article />
<div class="previouspost">
<txp:link_to_prev><< Previous: <txp:prev_title /></txp:link_to_prev>
</div>
<div class="nextpost">
<txp:link_to_next>Next: <txp:next_title /> >></txp:link_to_next>
</div>
<txp:else />
<txp:if_category>
<txp:article form="excerpt" />
<txp:else />
<txp:article_custom section="article" form="excerpt" />
</txp:if_category>
<p><txp:older><< Previous</txp:older> <txp:newer>Next >></txp:newer></p>
</txp:if_individual_article>
Offline
#4 2008-01-18 04:20:20
- progre55
- Member
- Registered: 2006-05-02
- Posts: 668
Re: Category List Question
Thank You. :)
Offline
Pages: 1