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


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:

  1. 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.
  2. Like the content() and hasContent() 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.


<?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.

functions/partexists.txt · Last modified: 2012-08-06 08:42 by jackie
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