The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

Slim 3 & Twig - How to add function to Twig?

John Leahy's Avatar

John Leahy

04 Mar, 2016 03:24 PM

Hi,

I'm trying to update my project to Slim 3. I've never really used Twig before, and now that it's kind of bundled with Slim, I'm having a heck of time with it.

I need to extend it to add a couple Functions into Twig, but I can't figure out how to do this. The Slim documentation is seriously lacking in anything other than generic "this is how you load Twig into Slim", and Twig's documentation is too generic to be of much help to me unfortunately.

This is my final hurdle to get over with the upgrade, so I'd like to learn and see it through. Can anyone offer any advice or help please? Thanks in advance!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac