kolber / stacey

Cheap & easy content management
http://staceyapp.com
MIT License
1.04k stars 131 forks source link

3.x: twig extensions working example?! #72

Closed teamgroove closed 11 years ago

teamgroove commented 11 years ago

I tried creating my own filter by an twig-extension, which turned -> not to work.

Is there any example in the wild offering a functioning twig-extension running in stacey3.x?

just for the records: Here's a Base64-function incorporated into a twig-ext, which i'd like to fork and use in stacey3.x https://github.com/cryptocompress/DataUrlTwigExtension/blob/master/CryptoCompress/TwigBundle/Extension/DataUrlTwigExtension.php

I helped my self editing the core now, but this is an ugly hack.

kolber commented 11 years ago

I have been using custom and default twig filters for quite some time without having any issues.

Are you getting in PHP errors in your install? I'm not sure if it is just some sort of type, but those backslashes in new \Twig_Filter_Method don't look like they should be there.

andremalenfant commented 11 years ago

in app/extensions/twig-extensions.php... they are working but remember that Twig has changed since then. You can upgrade Twig to get the version that the Twig documentation refers to but check my issue: https://github.com/kolber/stacey/issues/77

kolber commented 11 years ago

Thanks Andre, I will close this and focus on issue #77.