Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
A single entry on the index but not the other pages?
Searched and looked through Textbook and the FAQ but couldn’t quite find the solution to my problem.
Essentially, I’m limiting the index page of my site my using <txp:article limit=“1” />.
On the archive/article pages, I just have the regular <txp:article />. I have an if_individual_article bit to sort the prev and next links but otherwise, on category pages and such, I just want the regular list of articles to show, not limited to one. However, all pages are listing just one article — for the category pages, this is the most recent one from that category and not all the entries for that category.
What am I doing wrong?
Thanks,
N.
Offline
Re: A single entry on the index but not the other pages?
You are probably linking the categories to the homepage (www.your-domain.com/?c=your_category) so they will be outputted by that <txp:article limit="1" />
on your front page.
You could use conditional, like:
<txp:if_category>
<txp:article limit="9999" />
<txp:else />
<txp:article limit="1" />
</txp:if_category>
Or you could link those categories to somewhere else, like inside your archive page, and then they would be outputted same way as posting in your archive.
Cheers!
Offline
Re: A single entry on the index but not the other pages?
Or you can use glx_if
<txp:glx_if_frontpage><txp:article limit="1" /><txp:else /><txp:article limit="10" /></txp:glx_if_frontpage>
Last edited by colak (2007-12-02 07:29:35)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: A single entry on the index but not the other pages?
Another alternative:
<txp:if_category>
<txp:hide>We are on a category page; example.com/category/category-title</txp:hide>
<txp:article />
<txp:else />
<txp:if_search>
<txp:hide>Search results</txp:hide>
<txp:article />
<txp:else />
<txp:hide>Homepage</txp:hide>
<txp:article limit="1" />
</txp:if_search>
</txp:if_category>
Last edited by jm (2007-12-02 07:40:49)
Offline