Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-15 17:00:23

davidgordon
Member
Registered: 2005-04-10
Posts: 23

...create _two_ (different) article lists for one section?

When you visit my “Alpha” section page, using “if_article_list” I create a fancy list showing the latest five articles posted. This list is formatted nicely. I also want you be able to see older articles – but just a plain list. I can’t work out how I might do this, even if its possible.

Maybe I need to be using categories?

Any pointers?

Thanks!

Offline

#2 2006-03-15 17:15:12

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: ...create _two_ (different) article lists for one section?

Hi davidgordon.

You need to use the “offset” attribute for txp:article
Something like:
<code>
<div id=“latest”>
<txp:article limit=“5” />
</div>
<div id=“older”>
<txp:article offset=“5” />
</div>
</code>
More info in txp:article entry in the Textbook


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2006-03-15 17:19:07

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: ...create _two_ (different) article lists for one section?

You can use two <code><txp:article /></code> or <code><txp:article_custom /></code> tags, and use offsets to define your lists.

Offline

#4 2006-03-15 17:32:40

davidgordon
Member
Registered: 2005-04-10
Posts: 23

Re: ...create _two_ (different) article lists for one section?

Thanks maniqui, rsilletti.

I’m already using the “offset” to show the first article and then the next four using a different style (by using form).

But what I want is to show only those five recent articles on my page and then a link to a full archive list on a different “archive” page. So that’s two different pages, one page a list of five articles, another page with all the “Alpha” section articles listed.

Thanks!

Offline

#5 2006-03-15 17:53:17

maarten
Member
From: Netherlands
Registered: 2005-02-19
Posts: 130
Website

Re: ...create _two_ (different) article lists for one section?

Well the link to the “archive” page shouldn’t be the problem I think?

On the “archive” page you could use something like this: <code><txp:article_custom form=“headline” limit=1000 /></code>

Or am I misinterpreting what you want?

Offline

#6 2006-03-15 18:27:32

davidgordon
Member
Registered: 2005-04-10
Posts: 23

Re: ...create _two_ (different) article lists for one section?

maarten wrote:

Or am I misinterpreting what you want?

Maybe I’m not so good at explaining what I want!

I was thinking or separate archive lists for each section. So if I have sections “Alpha”, “Beta” and “Charlie” each will have its own archive page.

So far I can only create an archive for all sections. I am trying

<code> <txp:section link=“1” title=“1” wraptag=“p” name=“archive” /> </code>

and I understand your suggestion. But I can’t see any way to filter the archive page by section.

Thanks!

Offline

#7 2006-03-15 23:05:34

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

Re: ...create _two_ (different) article lists for one section?

create seperate section page/section pairs and use your section settings (on front page in particular) and article tags (which are section aware) to isolate your archives from one another by calling the required section by link.

Offline

Board footer

Powered by FluxBB