Pagination URL parameter

$dsg_pagination_parameter sets the name of parameter containing page number that is attached to each pagination link and then read back from the URL. By fetching this parameter from URL, Dead Simple Gallery will know which page is the current page. By default $dsg_pagination_parameter is set to "dsg_page".

<?php
  $dsg_pagination_per_page = 12; // number of images per page (it enables pagination)
  $dsg_pagination_parameter = 'gallery_page'; // pagination parameter added to the URL
?>
...
<?php include 'dsg.php'; ?>
<?php echo $dsg_pagination_nav; // output pagination links ?>

Second page of the gallery in index.php file, will have the following URL:

(...)/index.php?gallery_page=2

And following HTML:

<nav>
  <ul class="pagination">
    <li class="first"><a href="?gallery_page=1" title="First page">First</a></li>
    <li class="prev"><a href="?gallery_page=1" title="Previous page">Previous</a></li>
    <li><a href="?gallery_page=1" title="Page 1">1</a></li>
    <li class="active"><span>2</span></li>
    <li><a href="?gallery_page=3" title="Page 3">3</a></li>
    <li><a href="?gallery_page=4" title="Page 4">4</a></li>
    <li><a href="?gallery_page=5" title="Page 5">5</a></li>
    <li class="spacer disabled"><span>&hellip;</span></li>
    <li class="next"><a href="?gallery_page=3" title="Next page">Next</a></li>
    <li class="last"><a href="?gallery_page=8" title="Last page">Last</a></li>
  </ul>
</nav>