GithubHelp home page GithubHelp logo

Comments (5)

odan avatar odan commented on August 17, 2024

I think url_for doesn't exists anymore, it should be path_for.

from twig-translation.

odan avatar odan commented on August 17, 2024

Can you try to replace url_for with path_for?

from twig-translation.

killua-eu avatar killua-eu commented on August 17, 2024

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.

odan avatar odan commented on August 17, 2024

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

A Symfony command example

from twig-translation.

killua-eu avatar killua-eu commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.