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


A “snippet” is bit of layout that might be used across many pages. For example, Wolf CMS comes with “header” and “footer” snippets.

Creating a Snippet

  1. Login to your Wolf CMS administration back-end.
  2. In the Snippets tab, click the “New Snippet” button.
  3. Write a name for this snippet (must be unique).
  4. Write the content “Body” of this snippet.
  5. You can decide to use (or not) a filter for this snippet by selecting it from the drop-down filter menu.
  6. Click on the “Save” button.

Using the Snippet

Including snippets in your page or layout is quite simple. You need to know the exact name of the snippet1), and then include this code where you want this snippet to appear:

<?php $this->includeSnippet('the_name_of_the_snippet') ?>

For further details on the includeSnippet function, consult the function reference page.

1) The same as it appears under the Snippets tab
howto/snippets.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