Comments (5)
I think url_for doesn't exists anymore, it should be path_for.
from twig-translation.
Can you try to replace url_for
with path_for
?
from twig-translation.
Sorry for the late reply. Its the other way around, path_for doesn't exist any more (at least not in the latest https://github.com/slimphp/Twig-View#custom-template-functions Using path_for gets me
Twig \ Error \ SyntaxError
Unknown "path_for" function.
when rendering a page, so there's no backward compat too I could rely on.
from twig-translation.
As first I would recommend that you use the the same container instance as you would use for your Slim app. Don't build a new container for this special use case. If you use the same container and app instance then it should work like in your application.
PS: I just updated the example: https://github.com/odan/twig-translation/blob/master/README.md#parsing-twig-files
from twig-translation.
Uh, wow. I was actually building a container and including the slim app one a few lines later. I honestly didn't see that. Probably some really bad kind of code dyslexia or ... (fill in your favourite excuse for looking at your code without actually reading in).
For some reason the path_for / url_for thing disappeared too and I'm unable to replicate it. Sorry for the confusion, closing this issue.
from twig-translation.
Related Issues (6)
- wrong installation instructions HOT 1
- Translation file not read? HOT 1
- Update for Twig 3 HOT 3
- TwigCompiler HOT 5
- Im stuck ... ConfigCacheFactory' not found HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twig-translation.