Enabling pagination

To enable pagination simply define number of images that you wish to appear per page using $dsg_pagination_per_page variable and print out $dsg_pagination_nav variable:

<?php
  // set number of images per page (it enables pagination)
  $dsg_pagination_per_page = 12;
?>
...
<?php include 'dsg.php'; ?>
<?php echo $dsg_pagination_nav; // print pagination links ?>

Please remember that pagination navigation is not displayed automatically, you will need to print it out manually by pasting the following code <?php echo $dsg_pagination_nav; ?> wherever you wish the gallery to appear, just like in the example above.

Printing out the navigation using $dsg_pagination_nav will result in HTML similar to the following (depending on number of photos in the gallery and current page):

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