Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Show by 2 articles from each category - how2?
I have 4 categories. On main page i want to show by 2 articles from each of categories with some text before every 2 articles. Now i can see only one solution – call artilce_custom 4 times.
For example i want to get this:
Articles from category ABC:
1. Title - Excerpt
2. Title - Excerpt
Articles from category JKL:
1. Title - Excerpt
2. Title - Excerpt
Articles from category ZYX:
1. Title - Excerpt
2. Title - Excerpt
Is there some more elegance method?
Last edited by the_ghost (2008-04-02 21:50:07)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: Show by 2 articles from each category - how2?
I think you need txp:if_different in your article form. Here’s an example of how to use it.
Offline
Re: Show by 2 articles from each category - how2?
I thought over this, but how do I limit to show only 2 articles from each category?
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
#4 2008-04-03 06:41:23
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Show by 2 articles from each category - how2?
Well, you could also use zem_nth, I think.
It’s probably simpler to use article_custom 4 times, rather than use multiple plugins, unless you anticipate the number of categories to grow significantly.
Offline