Expose config.yml values globally for Twig templates in Symfony2 applications
Lets suppose you have created a bundle that has some specific configuration in the config.yml file (this is done by exposing semantic configuration). For example the languages supported by the...
View ArticleTwig-extensions in Symfony2
Twig comes with multiple filters that provide functions like round, slice, sort, etc. In case you need more filters Twig-extensions becomes handy because it implements all those filters that are not...
View ArticleFix ‘A template that extends another one cannot have a body in …’ in Twig...
This may be a confusing error at first but it’s quite self explanatory. You can’t have any HTML text in a Twig template that extends another, not even comments.So for example this would raise the...
View ArticleAdd Twig syntax highlight in Sublime Text 2
Select the “Preferences->Browse Packages…” menu to open the folder that contains Sublime Text 2 packages.Download the Anomareh/PHP-Twig.tmbundle repository contents to a folder called PHP-Twig...
View ArticleTranslate Symfony TimezoneType Field Type
The TimezoneType Field TypeSymfony has an specific Field Type to create a Timezone select widget in forms called TimezoneType. Very handy because it’s a pretty usual need in web applications.It uses...
View ArticleExpose config.yml values globally for Twig templates in Symfony2 applications
Lets suppose you have created a bundle that has some specific configuration in the config.yml file (this is done by exposing semantic configuration). For example the languages supported by the...
View ArticleTwig-extensions in Symfony2
Twig comes with multiple filters that provide functions like round, slice, sort, etc. In case you need more filters Twig-extensions becomes handy because it implements all those filters that are not...
View ArticleFix ‘A template that extends another one cannot have a body in …’ in Twig...
This may be a confusing error at first but it’s quite self explanatory. You can’t have any HTML text in a Twig template that extends another, not even comments. So for example this would raise the...
View ArticleAdd Twig syntax highlight in Sublime Text 2
Select the “Preferences->Browse Packages…” menu to open the folder that contains Sublime Text 2 packages. Download the Anomareh/PHP-Twig.tmbundle repository contents to a folder called PHP-Twig...
View ArticleTranslate Symfony TimezoneType Field Type
The TimezoneType Field Type Symfony has an specific Field Type to create a Timezone select widget in forms called TimezoneType. Very handy because it’s a pretty usual need in web applications. It uses...
View Article
More Pages to Explore .....