Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-10968

Render pagination fully within the template

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 3.1.0-a1
    • 3.1.0-dev
    • Styles
    • None

      Since phpBB 2 pagination has been rendered mostly within the source. This limits just what designers can do with pagination. The current form is also questionable in terms of "best practice". The aim is to move rendering completely to the template via the use of a block element. Enabling S_ template vars also allows for control over specific aspects of the pagination output such as next, previous, active and ellipsis.

      Related to this - merging the capabilities of the topic_generate_pagination with generate_pagination removes an element of duplication.

      Templates can utilise the new functionality as such:

      <div class="pagination">
                  <ul>
                  <!-- BEGIN pagination -->
                     <!-- IF pagination.S_IS_PREV -->
                     <!-- ELSEIF pagination.S_IS_CURRENT -->
                     <li class="active"><span>{pagination.PAGE_NUMBER}</span></li>
                     <!-- ELSEIF pagination.S_IS_ELLIPSIS -->
                     <li class="ellipsis"><span>{L_ELLIPSIS}</span></li>
                     <!-- ELSEIF pagination.S_IS_NEXT -->
                     <!-- ELSE -->
                     <li><a href="{pagination.PAGE_URL}">{pagination.PAGE_NUMBER}</a></li>
                     <!-- ENDIF -->
                  <!-- END pagination -->
                  </ul>
      </div>
      

      Embedding pagination blocks within other blocks is done in a similar way, extending the block names in the variables as required.

            naderman Nils Adermann
            psoTFX psoTFX [X] (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: