Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-06-29 18:36:21
- dimfish
- Member
- Registered: 2006-06-01
- Posts: 72
If cat has =1 or >1 art, display either full or excerpt
Hi
Can anyone advise me how I can do this?
If a category has only one article, display that article in full
If a category has more than one article, display title/excerpt only of all articles in that category.
I am trying this but without any luck:
<code>
<txp:if_custom_field name=“singlepage” val=“yes”>
<txp:article form=“static_article” limit=1 />
<txp:else />
<txp:article form=“excerpts” />
</txp:if_custom_field>
</code>
where articles that are the only one in a cat get tagged with yes in custom field singlepage. ‘Static_article’ calls full article, ‘excerpts’ just title and excerpt.
(Sorry if this is crossing over slightly with my unanswered earlier post…getting desperate…)
Thanks.
A.
Last edited by dimfish (2006-06-29 18:50:00)
Offline
Re: If cat has =1 or >1 art, display either full or excerpt
Not thinking clearly since I really need to get some sleep, but maybe the <code>pageby</code>-attribute could help you out here. Check this forum thread.
…Prrrrrrrr…
Offline