Trace: » linkbyid » next » page_status » parent » partexists » previous » slug » functions » this » title
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
title()
The title() function returns the title of the current page. This code:
<?php echo $this->title(); ?>
will return the text found in the “Page Title” field, prominently displayed when editing a page.
Notes
This function does not take any parameters, but it can be used in conjunction with the find() function to display the title of a page that is not current.
Another example of its use can be found in “header” snippet for the Simple layout to generate Wolf's main navigation:
<li><?php echo $menu->link($menu->title, (in_array($menu->slug, explode('/', $this->url)) ? ' class="current"': null)); ?></li>
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
