Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
etc_pagination: paginate everything
Based on the orphaned ob1_pagination plugin, etc_pagination inherits most of its features and adds wraptag, break and some other attributes. It can be used alone for <txp:article /> list pagination, but its main interest is the ability to paginate <txp:article_custom /> and other lists, with a little help of etc_query.
More info and download on the home page.
Offline
Re: etc_pagination: paginate everything
Great to hear this!
Looks like there’s something [not] unfolding with the link you provided as the homepage, though…
Offline
Re: etc_pagination: paginate everything
Could you be more specific, please, it looks ok for me?
Offline
Re: etc_pagination: paginate everything
Great Oleg :)
Thank you
Offline
Offline
#6 2013-02-01 14:16:27
- milosevic
- Member

- From: Madrid, Spain
- Registered: 2005-09-19
- Posts: 390
Re: etc_pagination: paginate everything
Good news, thanks for your work!
<txp:rocks/>
Offline
Re: etc_pagination: paginate everything
Now I can see it @etc, yesterday the link was returning a 404 :)
Great work.
Offline
Re: etc_pagination: paginate everything
I must have been toying with something at this moment. Thanks guys!
Offline
Re: etc_pagination: paginate everything
Hi Oleg,
Are there any examples of usage for txp:article alone? I’m getting strange results using the plugin with something like this:
<txp:if_article_list>
<div class="twelve columns">
<txp:article limit="30">
<article>
....
</article>
</txp:article>
<txp:etc_pagination prev="Previous" next="Next" wraptag="ul" break="li" class="link-list" />
</div><!-- end twelve columns -->
</txp:if_article_list>
I don’t use forms for my txp:article tags anymore, is the sample code above ok for this plugin or am I missing something basic? The number of links is correct but on clicking page 2 or any other page, there is no output. Most likely I’m just missing the obvious…
Last edited by jstubbs (2013-02-11 09:28:23)
Offline
Re: etc_pagination: paginate everything
Hi Jonathan,
it should work as is with <txp:article />. Can you check if the hrefs of the generated page links look correct and post them here?
Offline
Re: etc_pagination: paginate everything
Does <txp:etc_pagination prev="Previous" next="Next" wraptag="ul" break="li" class="link-list" /> have to be inside the container tag of <txp:article>? I had it outside as otherwise there was like 300 links!
I’ll put it back up on the site and report back…
Offline
Re: etc_pagination: paginate everything
OK generated links look ok but there is no output from <txp:article limit="30">. The URL’s are domain.com/?pg=3 (1,2,3,4 etc etc). No problems there.
Page source reports empty article tags, using the following code:
<txp:if_article_list>
<div class="twelve columns">
<txp:article limit="30">
<article>
....
</article>
</txp:article>
<txp:etc_pagination prev="Previous" next="Next" wraptag="ul" break="li" class="link-list" />
</div><!-- end twelve columns -->
</txp:if_article_list>
The actual page code is a little more complex, but that’s the gist of it. In page source I see 30 of these:
<article class=""></article>
The class is set by a custom field, and there are various txp:if_custom_field tags within the txp:article call.
Offline
Re: etc_pagination: paginate everything
I was offline, sorry Jonathan.
jstubbs wrote:
Does
<txp:etc_pagination prev="Previous" next="Next" wraptag="ul" break="li" class="link-list" />have to be inside the container tag of<txp:article>?
No, otherwise each article will generate a new pagination list. Formless <txp:article /> by itself is ok.
Getting 30 empty articles is not related with pagination, could you post the whole <txp:article /> code?
Offline
Re: etc_pagination: paginate everything
Sure! Sorry about the long code block!
<txp:if_article_list>
<div class="twelve columns">
<txp:article limit="30">
<article class="<txp:custom_field name='Content_type' />">
<txp:if_custom_field name="Content_type" value="media">
<div class="six columns centered">
<header>
<h1 class="headline text-center"><txp:permlink title='Permanent link for <txp:title />'><txp:title /></txp:permlink></h1>
</header>
<div class="entry">
<txp:excerpt />
<footer>
<p class="mediadate"><txp:permlink title='Permanent link for <txp:title />' class="date icon-camera"><txp:posted /></txp:permlink></p>
</footer>
</div><!-- end entry -->
</div><!-- end six columns -->
<div class="image">
<txp:body />
</div>
<div class="line"></div>
</txp:if_custom_field>
<txp:if_custom_field name="content_type" value="video">
<div class="six columns centered">
<header>
<h1 class="headline text-center"><a href="<txp:custom_field name="Video_link" />"><txp:title /></a></h1>
</header>
<div class="entry">
<txp:body />
<footer>
<p class="videodate"><txp:permlink title='Permanent link for <txp:title />' class="date icon-play"><txp:posted /></txp:permlink></p>
</footer>
</div><!-- end entry -->
</div><!-- end six columns -->
<div class="flex-video <txp:custom_field name="Video_meta" />">
<p><txp:custom_field name="Video_embed" escape="" /></p>
</div><!-- end flex-video -->
<div class="line"></div>
</txp:if_custom_field>
<txp:if_custom_field name="content_type" value="blog">
<div class="six columns centered">
<header>
<h1 class="headline text-center"><txp:permlink title='Permanent link for <txp:title />'><txp:title /></txp:permlink></h1>
</header>
<div class="entry">
<txp:body />
<footer>
<p class="blogdate"><txp:permlink title='Permanent link for <txp:title />' class="date icon-connection"><txp:posted /></txp:permlink></p>
</footer>
</div><!-- end entry -->
</div><!-- end six columns -->
<div class="line"></div>
</txp:if_custom_field>
<txp:if_custom_field name="content_type" value="link">
<div class="six columns centered">
<header>
<h1 class="headline text-center"><a href="<txp:custom_field name="Link" />"><txp:title /></a></h1>
</header>
<div class="entry">
<txp:body />
<footer>
<p class="linkdate"><txp:permlink title='Permanent link for <txp:title />' class="date icon-link"><txp:posted /></txp:permlink></p>
</footer>
</div><!-- end entry -->
</div><!-- end six columns -->
<div class="line"></div>
</txp:if_custom_field>
<txp:if_custom_field name="content_type" value="quote">
<div class="six columns centered">
<header>
<h1 class="headline text-center"><a href="<txp:custom_field name="Quote_link" />"><txp:title /></a></h1>
</header>
<div class="entry">
<txp:body />
<footer>
<p class="author"><txp:custom_field name="Quote_author" /><txp:permlink title='Permanent link for <txp:title />' class="date icon-comment-left"><txp:posted /></txp:permlink></p>
</footer>
</div><!-- end entry -->
</div><!-- end six columns -->
<div class="line"></div>
</txp:if_custom_field>
</article>
</txp:article>
</div><!-- end twelve columns -->
<div class="ten columns centered text-center">
<div id="newer-older">
<txp:etc_pagination prev="Previous" next="Next" wraptag="ul" break="li" class="link-list" />
</div>
</div>
</txp:if_article_list>
Offline
Offline