Translations of this page?:
General
Getting Support
Administration
Design
Wolf Reference
Plugin Development
Core Development
- Design documents
- Working guidelines
- References
Press, Graphics and Translations
Wolf CMS books section
Table of Contents
Snippets
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
- Login to your Wolf CMS administration back-end.
- In the Snippets tab, click the “New Snippet” button.
- Write a name for this snippet (must be unique).
- Write the content “Body” of this snippet.
- You can decide to use (or not) a filter for this snippet by selecting it from the drop-down filter menu.
- 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
Except where otherwise noted, content on this wiki is licensed under the following license:GNU Free Documentation License 1.2
