Skip to content
Ralf Hertsch edited this page Apr 24, 2014 · 4 revisions

With the TemplateTools Pattern you can access useful components, for example a search dialog for the CMS or a login dialog and pattern also help you to simplify the creation of your templates.

A Pattern can be php or twig function or a twig template you can directly include or extend in your own files.

The Pattern are divided into two Groups:

The Classic Pattern are useful if you are creating templates in the classic way and don't use any CSS Framework like Bootstrap.

The Bootstrap Pattern are useful if you are creating your templates using the Bootstrap Framework.

The pattern will return a complete rendered Twig Template so you can use the result directly in your template twig or php file.

Example for a Pattern Function, using php:

<?php $template['classic']->pager(); ?>

will return a complete pager which enable you to step from page to page through your website.

Example for a Pattern Template, using twig:

{{ include('@pattern/classic/search.div.twig') }}

will include a <div> container with a complete Search Dialog for your Content Management System.

Please check this Wiki for a description and hints for the usage of the different Pattern:

Twig Service | Bootstrap Pattern