Skip to content

Instantly share code, notes, and snippets.

@bastianallgeier
Forked from niklausgerber/separator
Created March 2, 2012 10:20
Show Gist options
  • Save bastianallgeier/1957544 to your computer and use it in GitHub Desktop.
Save bastianallgeier/1957544 to your computer and use it in GitHub Desktop.
Separator
<?php if($page->hasPrev()): ?>
« <a href="<?php echo $page->prev()->url() ?>">Previous</a>
<?php endif ?>
<?php if($page->hasPrev() && $page->hasNext()): ?>
| //Separator: Should only show up between "Previous | Next" but not if there is just one.
<?php endif ?>
<?php if($page->hasNext()): ?>
<a href="<?php echo $page->next()->url() ?>">Next</a> »
<?php endif ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment