Forum

Thread tagged as: Question, Problem, Error

Pagination dissappeared after upgrading

Simple gallery pagination disappeared after upgrading to latest version. Grateful for any help.

Template code

<perch:after>
  <perch:if exists="paging">
  </div><!--Closing Div of Row-->
   <div class="row">
  <div class="col-md-12">
    <div class="paging">
      Page <perch:content id="current_page" type="hidden" /> of <perch:content id="number_of_pages" type="hidden" />
      <perch:if exists="not_first_page">
        <a href="<perch:content id="prev_url" type="hidden" encode="false" />">Previous</a>
      </perch:if>
      <perch:content id="page_links" encode="false" />
      <perch:if exists="not_last_page">
        <a href="<perch:content id="next_url" type="hidden" encode="false" />">Next</a>
      </perch:if>
    </div>
    </div>
    </div>
  </perch:if>
</perch:after>

Code on Page

<?php
perch_content_custom('Gallery', array(
     'template' => 'galleryMain.html',
              'count'=>18,
'sort-order'=>'DESC',
'paginate'=>true
));
?>
Phil Wragg

Phil Wragg 0 points

  • 7 years ago

Apologies believe I have sorted - old version displayed Page 1 of 1 - new version only displays if pagination required?

If you want to display pagination even if there is only one page, remove the <perch:if exists="paging"> (and closing tag)