Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10968

Render pagination fully within the template

    XMLWordPrintable

Details

    • Improvement
    • Status: Unverified Fix (View Workflow)
    • Trivial
    • Resolution: Fixed
    • 3.1.0-dev
    • 3.1.0-a1
    • Styles
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: