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

Render pagination fully within the template

    Details

    • Type: Improvement
    • Status: Unverified Fix
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Component/s: Styles
    • Labels:
      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.

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              naderman Nils Adermann
              Reporter:
              psoTFX psoTFX
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development