Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2005-11-04 03:47:28
- zem
- 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>
Another:
<txp:article limit=5 pageby=10 />
<!-- google ad -->
<txp:article limit=5 offset=5 pageby=10 />
The pageby
number should be the total number of articles displayed on the page. Without pageby
, each 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.
Alex
Offline
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.
Offline
Re: txp:article pageby attribute
This results in side effects in the context of search result listings.
Last edited by wet (2006-01-12 18:26:11)
Offline
Pages: 1