-
Notifications
You must be signed in to change notification settings - Fork 40
Filters
m3nt0r edited this page Jun 25, 2012
·
2 revisions
The TwigView class adds some sugar to templates by exposing some Helper methods as filters. It features the most common (and useful) ones. If you think i've left out an important method, feel free to extend the filter (see ./extensions
folder) and send me a pull request.
By default all filter sets (helpers) are enabled. Currently available are:
- time
- number
- text
- i18n
You can find usage examples for all custom filters inside the examples
directory.
- translation.tpl
- filters.tpl
You can disable any of them by setting Configure::write('TwigView.extensions')
with an list of extensions
you want (lowercase, like above). If you want to disabled them all just set an empty array
Configure::write('TwigView.extensions', array());
or change each name to something like 'time_disabled' as the load condition is simply using in_array.
Configure::write('TwigView.extensions', array(
'time',
'text-DISABLED'
));
That's all there is to it