Paging Builds are composed of the following parts held within an array:
Build Key | Descriptions |
startWrap | Begins the element block of paging. |
beforePrev | HTML placed before the "Previous" page link. Also uses [[URL]] as a place holder which is switch out with the actual link. |
titlePrev | Custom title for "Previous" page link. |
afterPrev | HTML placed after the "Previous" page link. |
beforeNonLink | HTML placed before the title of a non-link. Also uses [[URL]] as a place holder which is switch out with the actual link. |
afterNonLink | HTML placed after the title of a non-link. |
beforeLink | HTML placed before the title of a link. Also uses [[URL]] as a place holder which is switch out with the actual link. |
afterLink | HTML placed after the title of a link. |
beforeNext | HTML placed before the "Next" page link. Also uses [[URL]] as a place holder which is switch out with the actual link. |
titleNext | Custom title for "Next" page link. |
afterNext | HTML placed after the "Next" page link. |
endWrap | Ends the element block of paging. |
The following is an example of how the Paging Build would dynamically populate within the HTML:
Paging Build Setup
<?php
$PagingBuild = array(
'startWrap' => '<ul>',
'beforePrev' => '<li><a href="[[URL]]">',
'titlePrev' => 'Previous',
'afterPrev' => '</a></li>',
'beforeNonLink' => '<strong>',
'afterNonLink' => '</strong>',
'beforeLink' => '<li><a href="[[URL]]">',
'afterLink' => '</a></li>',
'beforeNext' => '<li><a href="[[URL]]">',
'titleNext' => 'Next',
'afterNext' => '</a></li>',
'endWrap' => '</ul>'
);
?>
Paging Build Displayed
<html>
<ul>
<li><a href="../blog/pg/1">Previous</a></li>
<li><a href="../blog/pg/1">1</a></li>
<li><strong>2</strong></li> <!--Current Page-->
<li><a href="../blog/pg/3">3</a></li>
<li><a href="../blog/pg/3">Next</a></li>
</ul>
</html>
Get Your Paging Build
For your paging links to be displayed, you must use a Get Call with the "Paging" option.
The following example is how you would make this call:
<?php get('Paging');?>
**NOTE** - The variable "$PagingBuild" carrying the array CAN NOT be renamed to anything else. This will cause an error in the builder file.