Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-09-16 13:16:53

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Need to list each category of article titles intoTwo different pages

I need to list each category of article titles (articles listed by category) into two different pages, based on the day they where posted, so that the eldest articles be in the second page,

moreover I need to have an amount of articles in the first page that could be set different for each category, so that if I list more titles in a certain page, cause in this page are listed articles from more categories I can show less titles from every category; in ther case I list more articles for less categories.
This post, I think is a further development of what I asked in this antecedent (http://forum.textpattern.com/viewtopic.php?id=31572), so that I think I need to work, processing more again the same conditional expressions.
Thanks in advance
Bongo-man

Last edited by Bongo-man (2009-09-16 13:20:02)

Offline

#2 2009-09-21 16:53:39

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: Need to list each category of article titles intoTwo different pages

Is it not possible, or this lacking of answer is owed to the presence of the answer in some kind of Textpattern FAQs? Are there any link to guide me in the direction of finding any solution for this problem?
Till now I have pages with lot of article titles listed in each of them.
They are too much and I need to find a solution.
Thanks for paying me attention,
cheers
Bongo-man

Offline

#3 2009-09-21 17:09:17

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Need to list each category of article titles intoTwo different pages

I’m not sure what you’re after. Do you mean two pages per category, or two pages that include articles from all categories? I think you mean the latter, but I’m not sure. Do you want to list all articles from each category, or do you want a fixed number of articles on each page? If you want multiple categories on the same page, do you want them grouped by category?


Code is topiary

Offline

#4 2009-09-21 18:48:46

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Need to list each category of article titles intoTwo different pages

Bongo-man wrote:

or this lacking of answer is owed to the presence of the answer in some kind of Textpattern FAQs?

If that were the case, we would have pointed you to it ;)
Like jsoo, I’ve been wondering what it is you’re actually trying to achieve. Still not sure, but looking at your other post I think you are using the article_custom tag, and still need some sort of pagination. Natively this is not possible. But you could have a look at the chh_article_custom plugin, its <txp:chh_article /> tag allows for more customization than the native <txp:article /> tag, and lets you use pagination. The plugin is not maintained anymore, but as far as I know it still works.
Otherwise you might have a look at smd_query.

Offline

#5 2009-09-21 19:54:44

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: Need to list each category of article titles intoTwo different pages

I’m sorry I made a little error: I have all the article titles in specific (tematic) pages where article titles are listed on the basis of their category with every section page containing somespecific categories (really to each section I aplied a same template, but getting the result of having a different physical-like directory for each index page).

Given that the articles titles in each section (index) – page are listed grouped in their specific categories, each page has at now too much titles listed and having each category of every index page a different number of articles in it, I need the exceeding articles of each category/section be listed in a second index page for every section, then following the same criterion.

To list the titles/category/section I used <txp:article_custom> inserted in a <txp:if_section> so that I used a single template to generate each section page (the first page).
Now I need the same template produce also a second page, in which are listed the remaining titles of every category exceeding for example the number of 5 articles/category.

Last edited by Bongo-man (2009-09-21 20:00:28)

Offline

#6 2009-09-21 20:10:42

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Need to list each category of article titles intoTwo different pages

If you will only ever need 2 pages, would it be an idea to put the code for the second page in an article (let’s say titled ‘next’)? So you would have your section index page (site.com/your-section/) where you can have a link to the second page, which would be site.com/your-section/next. You’d need to use the limit attribute in the article_custom tags on the section index page; inside the ‘next’ article use the same tags but use the offset attribute instead. Don’t forget to turn Textile off for that article.

Offline

Board footer

Powered by FluxBB