Trace: » installation » taches_cron » urls_propres » findbyid » link » linkbyid » next » page_status » parent » partexists
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
partExists()
The partExists() function is related to the hasContent function, and tests for the simple presence of a specified page-part.
It can take two parameters:
- A page-part must given as the first parameter. If it is found, the function returns “true”, otherwise it returns “false”. These results are returned whether or not the page-part actually contains any content.
- Like the
content()andhasContent()functions,partExists()can also be inherited by setting the second parameter to “true” (optional); by default this is set to “false”.
partExists() was introduced for the 0.7.0 release of Wolf.
Usage
<?php if $this->partExists('page-part') { // do something if the part exists = true } else { // do something else if the part does not exist = false }; ?>
For more detail, see the hasContent() entry.
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
