Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-28 10:39:36

TomPhil
New Member
Registered: 2006-09-20
Posts: 5

Older/newer links missing when article list broken up

Hi,

I have my article list broken up as such; four articles, advert, three articles, advert, three articles. The “adverts” are held in forms.

Thus the code to display the articles runs like this:

<code>
<txp:article limit=“4” pageby=“10” />
<p><txp:output_form form=“advert1his” /></p>
<div align=“center”><img src=”<txp:site_url />images/1.gif” style=“height:1px;width:400px” class=“divider” alt=”“ /></div>
<txp:article limit=“3” offset=“4” pageby=“10” />
<p><txp:output_form form=“advert2his” /></p>
<div align=“center”><img src=”<txp:site_url />images/1.gif” style=“height:1px;width:400px” class=“divider” alt=”“ /></div>
<txp:article limit=“3” offset=“7” pageby=“10” />
</code>

While this splits the articles as I wish, and correctly inserts the advert forms, when I use this code, the newer/older links will not appear. If I replace all the code with a simple <txp:article /> tag, the newer/older links work fine, but I just can’t get them to work with the code above. I do have more than ten articles in the section (that should be displaying), and indeed they do with the simple article tag, but not with the code above.

I am using the following code to display the newer/older tags:

<code>
<txp:if_individual_article> <br><h6><txp:link_to_prev>Previous</txp:link_to_prev> - <txp:link_to_next>Next</txp:link_to_next></h6>
<txp:else /> <p><txp:older>Previous</txp:older> <txp:newer>Next</txp:newer></p>
</txp:if_individual_article>
</code>

Can anyone help, please?

Thanks.

Last edited by TomPhil (2006-09-28 10:53:44)

Offline

#2 2006-10-15 21:27:24

1beb
Plugin Author
From: Canada, Ontario, Toronto
Registered: 2004-11-22
Posts: 169
Website

Re: Older/newer links missing when article list broken up

I have a slightly different idea for an approach on this problem.

You could do this with forms, for example, you could override the form on every third or fourth article manually and in the new form include a call to the form with the advertisement within the condition

<code><txp:if_article_list ><call to advertising form></txp:if_article_list></code>

I’m not sure if the next/previous links are designed to work that way.

Offline

Board footer

Powered by FluxBB