List of useful Twig Macros helpers
To use with Symfony 2.0.x add this in your deps
file:
[SkiiTwigHelpersMacros]
git=http://github.com/ixmedia/SkiiTwigHelpersMacros.git
target=bundles/Skii/Bundle/TwigHelpersMacrosBundle
Be sure to have it loaded in your Symfony App/AppKernel.php
file like this:
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
…
new Skii\Bundle\TwigHelpersMacrosBundle\SkiiTwigHelpersMacrosBundle(),
);
return $bundles;
}
…
}
And just import it in your Twig template as needed:
{% import 'SkiiTwigHelpersMacrosBundle::helpers.html.twig' as skiiHelpers %}
For example in a Twig template adding this:
{{ skiiHelpers.tw_follow_btn('iXmedia') }}
Will output something like that:
- Add every type of Twitter feeds widget support. (Search, List, Faves)
© 2012 iXmédia and licensed under the MIT license.