Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there a way to pass twig templates for rendering in a config parameter ? #90

Closed
comensee opened this issue Oct 25, 2012 · 2 comments
Closed

Comments

@comensee
Copy link

I'd like to add some parameter to template coming from a custom parser.
Is there any other solution than fork the repo and make my own method.html.twig ?

thanks

@Seldaek
Copy link
Member

Seldaek commented Oct 25, 2012

you could override the template in your app/ directory - no need to fork the repo. See http://symfony.com/doc/current/book/templating.html#overriding-bundle-templates - you could inject values in it via twig globals perhaps, depends what you want to do exactly.

@comensee
Copy link
Author

i plan to add a "Bag Parameter" zone for POST,PUT and PATCH routes.
Using symfony forms, you need to specifiy the form name before passing them in params(eg. UserType has form name "user" so in post params you do : '{"user":{"param1":"x"}}' )
I'll add this info in my CustomDocParser.
Thanks for link, i forgot about this solution.
I close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants