The Slim Framework support forum has moved to 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


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!

  1. Josh Lockhart closed this discussion on 12 Feb, 2021 07:39 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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