How to manually render some single file and get result contents inside controller? For example, I have an registration email in html format. Before the sending I want add there some a data like a user name or something else. So I think the better way is to use the view engine I already have. But I have problems during realization.
At first I must say that action which sends email doesn't provide any view (email sends from inner action and does redirect to another route). So current view could be replaced with anything.
Problems I have: — The dump of View::partial() is always null, but not a string as it should. So I can't use gotten content. But at the same time partial() performed well inside controller without any 'echo' for it and add gotten data to the final view. — The dump of View::getContent() is always null too, so I can't use pick() or something because can't get result content. — Seems like stand-alone doesn't work properly without some render(). But there is only one file for my case and there is nothing to put into render().