Textpattern CMS support forum
- Developer emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
txp:article pageby attribute
The new (4.0.2)
pageby attribute is designed to help split an
<txp:article /> tag into several chunks, without messing up older/newer links. It tells
<txp:article /> how many articles to jump forward or back when an older or newer link is clicked. Quick example:
<div id="first"><txp:article limit=1 pageby=10 /></div> <div id="middle"><txp:article limit=8 offset=1 pageby=10 /></div> <div id="last"><txp:article limit=1 offset=9 pageby=10 /></div>
<txp:article limit=5 pageby=10 /> <!-- google ad --> <txp:article limit=5 offset=5 pageby=10 />
pageby number should be the total number of articles displayed on the page. Without
article tag would page independently based on its own
limit, as if it was the only article tag.
With a little imagination you can use this to break your main article list up into horizontal or vertical columns or chunks of any size, place ads or divisions anywhere you want, etc.
- From: Miami, FL
- Registered: 2005-04-13
- Posts: 228
Re: txp:article pageby attribute
excellent; this needs to get into textbook.
The only thing to add is that the second
<txp:article /> tag needs to be surrounded with
<txp:if_article_list>. Bad things will happen on single-article pages elsewhise.
Yes, I have tried turning it off and on.