Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-03-01 00:30:02

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

anything wrong with this archives page

Hi,
Bit stuck with an article archives page-
Problem is that the past entries are not displaying it will only display one

<txp:if_individual_article>
<txp:article form=“blog_entry” limit=“1” />
<txp:else />

<txp:article form=“blog_entry” limit=“1” />

</txp:if_individual_article>

<h3> Past Entries</h3>

<dl><txp:article limit=“999” offset=“1” form=“blog_listing” /></dl>

Last edited by kvnmcwebn (2009-03-01 00:30:20)


its a bad hen that wont scratch itself.
photogallery

Offline

#2 2009-03-01 12:22:45

TNT
Member
From: Rotterdam, Netherlands
Registered: 2006-01-06
Posts: 256
Website

Re: anything wrong with this archives page

Maybe try this:

<txp:if_individual_article>
<txp:article form=“blog_entry” limit=“1” />
<txp:else />

<txp:article form=“blog_entry” limit=“1” />

<h3> Past Entries</h3>

<dl><txp:article limit=“999” offset=“1” form=“blog_listing” /></dl>

</txp:if_individual_article>


Prrrrrrrr

Offline

#3 2009-03-01 14:44:00

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

Re: anything wrong with this archives page

kvnmcwebn wrote:

<txp:if_individual_article>
<txp:article form="blog_entry" limit="1" />
<txp:else />
<txp:article form="blog_entry" limit="1" />
</txp:if_individual_article>

First, this piece of code is exactly the same as

<txp:article form="blog_entry" limit="1" />

:)

Second, if you want to display past entries on an individual article page, you need to use <txp:article_custom />. Because <txp:article /> is context sensitive, it will display only the individual article on an individual article page. So the last part should be:

<h3> Past Entries</h3>
<dl><txp:article_custom limit="999" offset="1" form="blog_listing" /></dl>

But since article_custom is not context sensitive, you will need to tell it from which section and/or category to fetch the articles, using the section and/or category attribute. If you want it to list articles from the section the current article is in, or from the section currently viewed, you can just use section='<txp: section />'.

Offline

#4 2009-03-01 19:35:46

TNT
Member
From: Rotterdam, Netherlands
Registered: 2006-01-06
Posts: 256
Website

Re: anything wrong with this archives page

As most of the time, Els is probably right.


Prrrrrrrr

Offline

#5 2009-03-01 23:38:50

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: anything wrong with this archives page

thanks els


its a bad hen that wont scratch itself.
photogallery

Offline

Board footer

Powered by FluxBB