I’d like to have some layouts for messages in my MessageComponent.
Its send method should get an array of variables which used in view (layout) and render message with them, then send it..
The question is:
How to render a view (layout) with an array of variables in a component? and get rendered content instead of print it (in a component, too)
Thanks.
(Edit: Misread your question)
If you want to get the HTML of a rendered view, simply do something like:
This should work in a controller as well as a component.