Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Article list page numbers
I’d like to label article listings with ‘page x of y’. I am aware of soo_page_numbers and if the planets are in alignment I could likely use etc_query to do, well, anything – is there a method in core, perhaps using article
in some fashion, that can do the numbering?
Last edited by gaekwad (2013-12-03 19:20:16)
Offline
Re: Article list page numbers
Page <txp:page_url type="pg" />
of<txp:php>global $thispage; if(!empty($thispage)) echo 'Page ', $thispage['pg'], ' of ', $thispage['numPages'];</txp:php>
?
Last edited by etc (2013-12-03 19:38:35)
Offline
Re: Article list page numbers
etc wrote:
<txp:php>global $thispage; if(!empty($thispage)) echo 'Page ', $thispage['pg'], ' of ', $thispage['numPages'];</txp:php>
?
That works, you magnificent man. Thank you so much.
Last edited by gaekwad (2013-12-03 19:56:23)
Offline
Re: Article list page numbers
You are very welcome, gentle sir! To complete the tableau, in etc_query
-ish it would be
<txp:etc_query globals="thispage" data="Page {?pg} of {?numPages}" />,
but actually it’s more etc_pagination
job:
<txp:etc_pagination range="0">
Page {*} of {pages}
</txp:etc_pagination>
Offline
Re: Article list page numbers
I didn’t even know there was an etc_pagination
. Now I do. Please consider me appropriately humbled and grateful.
Offline
Pages: 1