raulriera edited this page Sep 13, 2010 · 4 revisions
Clone this wiki locally

Snippets are generally small pieces of content which are included in other pages or layouts. These snippets can contain plain text or HTML.

Snippets are generally used for re-usable elements in your website, such as the header, footer or a menu. However you arent limited to those. Snippets can be used for just about any section of your website that you want.

They can be included into your layouts or pages using SplashTags. Lets look at an example:

Say we created a snippet named header that contains our header code. If I want to include that snippet into my layout, I can simply use the following code:

<s:snippet name="header" />

Then everytime the layout is called for a page, the SplashTag will be replaced with the snippet titled “header”.

See, simple!