Pagination nav above the gallery

To show pagination links above gallery you have to disable automatic output print first. It will allow you to decide where to show gallery and pagination links (you can even show pagination multiple times — e.g. above and below a gallery).

The following example will show pagination above the gallery:

<?php
  $dsg_pagination_per_page = 12; // number of images per page (it enables pagination)
  $dsg_auto_output = FALSE; // disable auto output

  // when disabling auto output, this file will just prepare output and put it into $dsg_output variable
  include 'dsg.php';
?>
...
<?php echo $dsg_pagination_nav; // output top pagination links ?>
<ul class="imageList">
  <?php echo $dsg_output; // output gallery ?>
</ul>

In the following example pagination links will be shown above and below the gallery:

<?php
  $dsg_pagination_per_page = 12; // number of images per page (it enables pagination)
  $dsg_auto_output = FALSE; // disable auto output

  // when disabling auto output, this file will just prepare output and put it into $dsg_output variable
  include 'dsg.php';
?>
...
<?php echo $dsg_pagination_nav; // output top pagination links ?>
<ul class="imageList">
  <?php echo $dsg_output; // output gallery ?>
</ul>
<?php echo $dsg_pagination_nav; // output bottom pagination links ?>