Trace: » taches_cron » urls_propres » findbyid » link » linkbyid » next » page_status » parent » partexists » previous
Translations of this page?:
General
Getting & Giving Support
Administration
Design
- Tut. - Layouts and Themes
- Tut. - Navigation cookbook
- Tut. - How To section
Reference Material
Plugin Development
- Tut. - Writing a plugin
- Ref. - List of Events
- Ref. - Enabling cron jobs
- Ref. - PHPDoc
Core Development
- Ref. - PHPDoc
Press information
Wolf CMS books section
previous()
Wolf provides a simple “previous” and ”next” function. previous returns an array of values relating to the page preceding 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 “preceding” page.
Example
The following code tests to see if a “previous” page exists. If it does, it makes a link accompanied by a label with a double-arrow pointing left:
<?php if ($previous = $this->previous()): ?> <div style="float: left; border-top: thin solid #ccc; padding-top: 4px;"><?php echo $previous->link(); ?> « Previous</div> <?php endif; ?>
See also next.
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
