We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25803 ☆ A M B ☆
    • 721 Posts
    Hi,

    I understand how to set the first, last, active, next, previous, next page styles and how to jump out of the default container by using [[!+page.nav:notempty=`<div class="custom-class">[[!+page.nav]]</div>`]] but I also need a page index like:

    Page 1 of 4 | First << 1 2 3 4 >> Last

    Can't seem to see any examples anywhere. Any suggestions?
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      Articles is definitely short on examples. Take a look at some of the code in core/components/articles -- in particular the stuff that extends the modResource class. If I remember correctly, there is code there directly injected into the content of the blog container - it has a snippet with some pagination configuration details in it.
        • 25803 ☆ A M B ☆
        • 721 Posts
        Quote from: Everettg_99 at Jul 05, 2013, 03:30 PM
        Articles is definitely short on examples. Take a look at some of the code in core/components/articles -- in particular the stuff that extends the modResource class. If I remember correctly, there is code there directly injected into the content of the blog container - it has a snippet with some pagination configuration details in it.

        Yes I'm aware of that and am using that but I found a solution. Where I need pagination in the Articles template I use a statement like this:

        [[[[!+page.nav:notempty=`!$showpagination`]]]]


        Where the showpagination chunk has this:

        <div class="yourclassnamehere">Showing [[+page]] of [[+pageCount]] Pages [[!+page.nav]]</div>


        [[!+page.nav]] of course uses the pagination configuration details which do not include a spot for the page index, hence the solution above.