Snippets | Flextype Documentation

Snippets

Snippets are some sort of extensions written on PHP/HTML/JS languages that add different features on the site.

Snippets are stored in /site/snippets/ directory. You can edit snippets manually using any text editor or via the Admin panel in the snippets section.

Using snippets in the entry content

You can display snippet in the entry content with a shortcode snippets_exec like this:

Using snippets in the templates

Display a snippet in the template by it's name:

{{ snippets.exec('snippet-name')|raw }}
Language: en, ru