Jamroom Logo Jamroom 5 Core
is now Open Source!
Follow Jamroom on Twitter!

{jr_theme_page_jumper} Index {jr_theme_php_include}

{jr_theme_paginator}


{jr_theme_paginator} is used within Artist/Member Theme template files to "paginate" the output of items within the Artist/Member page.  It will paginate the following items in the Artist/Member Page:

  • songs
  • videos
  • store items
  • events
  • radio stations
  • TV channels
  • artist fans
  • blog entries
  • photo gallery images
  • vault items
Note: This Template function ONLY WORKS within Jamroom Artist/Member Theme templates - it will not work in the Jamroom Skin Templates located in the jamroom/skins directory.


This custom function works a bit differently then other functions, in that it is called TWICE within the template file - once at the "top" of the template file, and once again at the bottom of the template file.  This allows the function to setup the necessary PHP code at the top and bottom of the page.

Parameters

Name Type Required Default Description
mode string yes n/a the "mode" parameter tells the function where it is being used at - can be "header" or "footer".
template string no jr_theme_paginator.tpl name of the template file that contains the "previous" and "next" page links, and determines the rendered output of the function.
pagebreak number yes n/a The number of items to show on each page.
total number yes n/a The "total" number of entries.  You will normally assign one of the predefined Artist/Member Theme variables to this parameter - i.e. total=$SONG_COUNT
prev_page string no "Previous Page" Text to use for Previous Page link.
next_page string no "Next Page" Text to use for Next Page link.


Example

Example {jr_theme_paginator} usage within a Song sub-config file (song_list.tpl):

{jr_theme_paginator mode="header" pagebreak="4" total=$SONG_COUNT template="pager.tpl"}

Check out our song &quot;{$SONG_NAME}&quot;!<br>

{jr_theme_paginator mode="footer"}


contents of "pager.tpl" as used in example above:

<table class="inset-1">
  <tr>
    <td width="40%">
      {$PREV_PAGE_URL}
    </td>
    <td width="20%" style="text-align: center">
      {$PAGE_NUMBER}
    </td>
    <td width="40%" style="text-align: right">
      {$NEXT_PAGE_URL}
    </td>
  </tr>
</table>

 

Template Variables available in jr_theme_paginator template

Variable Description
{$PREV_PAGE_URL} URL that points to the Previous Page in the page set
{$NEXT_PAGE_URL} URL that points to Next Page in page set.
{$PAGE_NUMBER} Page Number of current page in set

{jr_theme_page_jumper} page 166 of 171 {jr_theme_php_include}
Solutions Products Support Community Company
Social Media Platform
Social Networking Software
Musician Website Manager
Community Builder
Jamroom 5
Jamroom 5 Modules
Jamroom Marketplace
Support Forum
Documentation
Support Center
Contact Support
Community Forum
Member Sites
Developers
About Us
Contact Us
Privacy Policy
©2003 - 2024 The Jamroom Network