We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7527
    • 437 Posts
    I have created a blog following a tutorial from Marys Coding Pad website. I have it all set up but my pagination seems off and I cant locate the problem. I have the following snippet call in my content:

    <p>[[!getPage@newsPaging? &elementClass=`modSnippet` &element=`getResources` &showHidden=`1` &tpl=`newsTpl_2` &limit=`10` &includeContent=`1` &parents=`9` &hideContainers=`1` &pageLimit=`5` &pageNavVar=`page.nav` ]]</p>
    <div class="wp-pagenavi"><span class="pages">Page [[+page]] of [[+pageCount]]</span> [[!+page.nav]]</div>


    My chunk newsTpl_2 contains the following:

    <div class="post-[[+id]] post hentry category-latest-news tag-tag3 tag-tag5 tag-tag7" id="post-[[+id]]">
    <div class="post-top">
    <div class="post-date">
    <span class="day">[[+publishedon:strtotime:date=`%d`]]</span>
    <span class="month">[[+publishedon:strtotime:date=`%b`]]</span>
    <span class="year">[[+publishedon:strtotime:date=`%Y`]]</span>
    </div>
    <h2><a href="[[~[[+id]]]]" rel="bookmark" title="Permanent Link to [[+pagetitle]]">[[+pagetitle]]</a></h2><h4>[[+introtext]]</h4>
    <p>[[+content:ellipsis=`350`]]</p>
    <a href="[[~[[+id]]]]" class="more-link">Read the rest of this entry »</a>
    
    
    </div>
    </div>


    The blog articles display fine, but the pagination is a little off. It shows pages 1, 2 and 3 at the bottom. I only have 3 articles so far which all appear on page 1, and then page 2 and 3 are blank. I don't understand why it is showing 3 page link when (at present) all the articles appear on page 1?
    Any ideas?
    Regards,

    DS
      www.PawsForWildlife.co.uk
      www.Borntobrick.co.uk
      • 7527
      • 437 Posts
      Ok on my call if I set
      &limit=`1`

      my two blog articles appear as one on page 1 and one on page 2. The pagination states page1 of 2 and page 2 of 2 normally.

      It appears that if I set the &limit parameter to anything more than 1, it allows blank pages and those pages (2 and 3) still state page 1 of 1?
        www.PawsForWildlife.co.uk
        www.Borntobrick.co.uk