Light-weight, fast, simple and powerful!
Translations of this page?:

Wolf provides a simple ”previous” and “next” function. next returns an array of values relating to the page following the current page, if it exists.1) It is thus not used on its own, but normally would be used in the Layout to provide a link to the “next” page.


The following code tests to see if a “next” page exists. If it does, it makes a link accompanied by a label with a double-arrow pointing right:

<?php if ($next = $this->next()): ?>
  <div style="float: right; border-top: thin solid #ccc; padding-top: 4px;">Next &#187; <?php echo $next->link(); ?></div>
<?php endif; ?>

See also previous.

1) Consult the documentation on this to find out what the “current” page is in different situations.
functions/next.txt · Last modified: 2011-09-12 00:46 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
Copyright 2010 / design by yello studio / Wolf CMS Inside