-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[NFR] Create a view method to simple render template to a string. #13825
Comments
This comment was marked as abuse.
This comment was marked as abuse.
This is actually useful. Not only for email templates, but for ajax responses when you need to return rendered html inside json. |
Wait, doesn't view->getRender() already do this? |
As I remember it is not so trivial. GetRender triggers events and can break something at the end. Partial can be used. Otherwise only forking can do safe render. |
@JABirchall you still have here controllerName and actionName. Right now this can be achieved by some hacky way - like simply create temporary new volt template in /tmp and then render it, but this is just workaround. |
Resolved in #14058 |
Watching the changes in code it seems the only real change is not to fire events. Is it planned to make available a method to do the action an the begining of this blog exposed? I mean $html = $view->toString($template, $params); where $template is an string with the volt template content and $params an array to use to render the template Thanks in advance |
@EcLaboratory This particular change is for the If you want a specific template to be parsed and returned, you can use the |
As a regular user I would like to have something like this:
without setting any additional params eg base path, layout, base template, etc.
The text was updated successfully, but these errors were encountered: