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

Display Page Content and "Parts"

Displaying content

By default, when a page is created in Wolf, the main editing area has a tab labelled “body” (circled in red below):

Page-part tabs

To display the default “body” content use:

<?php echo $this->content(); ?>

Creating page-parts

Additional tabs, or “page-parts”, like the “sidebar” tab (circled in blue, above) can be added by clicking on the green ”+” icon at the top-right of the editing area:

Page-part (tab) creation button

In Wolf CMS, when you create other sibling pages (child pages of a common parent page), the new pages will have the page-parts of the original sibling page auto-created. That is, if “Child1” page has body and sidebar, then further child pages of the same parent page will also have body and sidebar page-parts at creation.

In general:

  • Page-parts are auto-created matching the last page created at the same level.
  • Pages created as a child of Homepage always have only the body part.

Displaying page-parts

To display the additional page-part content (like “sidebar”, as in the picture above) use:

<?php echo $this->content('sidebar'); ?>

For more information on displaying and manipulating page content/page-parts (including how content from page-parts can be inherited from parent pages), see the content() function documentation.

howto/display_page_content_and_parts.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