Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#217 2017-11-03 10:22:40
Re: etc_pagination: paginate everything
Super Oleg. Thanks a lot … :)
PS
The file name of the download is still v.4.6 … :o
Last edited by RedFox (2017-11-03 10:29:15)
Offline
#218 2017-11-03 10:58:00
Offline
#219 2017-11-16 02:24:04
- hn1255
- New Member
- From: China
- Registered: 2017-11-16
- Posts: 6
Re: etc_pagination: paginate everything
I think it is powful.
Offline
#220 2018-04-25 16:40:45
Re: etc_pagination: paginate everything
Hi etc. For some reason I can not get pagination on my site using article_custom
.
<main id="content" class="white-background">
<div class="container">
<div class="row blog-listing has-sidebar">
<div class="col-12">
<txp:article_custom sort="Posted desc" section="blog" limit="1">
<article class="post featured <txp:if_article_image>has-thumbnail</txp:if_article_image>">
<txp:if_article_image><a href="<txp:permlink />" class="feature-image-link"><txp:article_image width="1180" height="680" alt="" /></a></txp:if_article_image>
<div class="post-details">
<h3><a href="<txp:permlink />"><txp:title /></a></h3>
<hr>
<txp:excerpt />
<a href="<txp:permlink />" class="read-more">Continuar <i class="saulticon-arrow-forward"></i></a>
</div>
</article>
</txp:article_custom>
</div>
<div class="col-12 col-lg-8 col-xl-9" id="box">
<div class="grid" data-masonry='{ "itemSelector": ".grid-item", "columnWidth": ".grid-sizer", "gutter": ".gutter-sizer", "percentPosition": true, "transitionDuration": "0.3s" }'>
<txp:article_custom sort="Posted desc" offset="1" limit="4" section="blog" form="blog" />
<div class="grid-sizer"></div>
<div class="gutter-sizer"></div>
</div>
<p class="extra-margin-bottom text-center">
<txp:etc_pagination range="2" prev="Previous" next="Next" wraptag="ul" break="li" />
</p>
</div>
</div>
</div>
</main>
As you can see there are two <article_custom />
tags, one for the featured post (Top), and the other for a list of “blog” articles. But no matter which <txp:etc_pagination />
I try, always I get no output. Empty. Any ideas? Thank you for your help.
Edit: PS. There are 6 articles in blog section.
Last edited by robhert (2018-04-25 16:43:50)
Offline
#221 2018-04-26 10:17:40
Re: etc_pagination: paginate everything
You need to set the number of pages in etc_pagination
in this case, <txp:article_custom />
does not set it. You can try
<txp:etc_pagination pages='<txp:etc_numpages pageby="5" section="blog" />' ... />
In 4.7 you can replace etc_numpages
with
<txp:article_custom pgonly pageby="5" section="blog" />
But you’d better switch to <txp:article />
if you can.
Offline
#222 2018-04-27 02:33:19
Re: etc_pagination: paginate everything
Thanks etc. Currently using <txp:article />
. :)
Offline
#223 2018-09-14 09:48:03
Re: etc_pagination: paginate everything
Hi Oleg,
Just creating a Textpattern theme that uses etc_pagination if installed. Quick question, how can I allow localisation for the prev
and next
texts? i.e. to use the gTxt
translations we have available in the core instead of hardcoded text?
Thanks!
Offline
#224 2018-09-14 10:03:27
Re: etc_pagination: paginate everything
Hi Phil,
have you tried next='<txp:text item="next" />'
, it should work as usual..?
Offline
#225 2018-09-14 10:09:52
Re: etc_pagination: paginate everything
etc wrote #314014:
have you tried
next='<txp:text item="next" />'
, it should work as usual..?
Great, I didn’t realise it would be that simple! Thanks Oleg.
Offline
#226 2018-09-14 10:15:38
Offline
#227 2019-08-15 09:04:37
Re: etc_pagination: paginate everything
Hi Oleg,
I am making minor changes to my site, as sticky articles are not included in the feeds.
I am including a simplified code I am using in the blog section as I can not see what might be wrong.
<txp:evaluate query='<txp:page_url type="pg" /> = 1'>
<txp:article status="live" limit="9999" listform="sticky_form" />
</txp:evaluate>
<txp:article limit="10" listform="live_form" form="" />
<txp:etc_pagination range="5" prev="Previous" next="Next" wraptag="ul" break="li" />
In the sticky_form
I have
<txp:if_custom_field name="c10" value="x">
<article class="sticky"><h3>
<a href="<txp:permlink />" rel="bookmark"><txp:title /></a></h3>
<txp:excerpt />
</article>
<txp:else />
</txp:if_custom_field>
and In the live_form
I have
<txp:if_custom_field name="c10" value="">
<article class="live">
<h3><a href="<txp:permlink />" rel="bookmark"><txp:title /></a></h3>
<txp:excerpt />
</article>
<txp:else />
</txp:if_custom_field>
Can anybody spot where I am messing up?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#228 2019-08-15 09:11:30
Re: etc_pagination: paginate everything
Got it! <txp:page_url type="pg" /> = 1'>
should be <txp:page_url type="pg" /> = 2'>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline