Rendering template of other action without forward
|Priority:||Should have||Due date:|
Rendering a template of another action without doing a forward is currently too complicated. It should be possible by just calling
The problem is a call to
resolveView which automatically uses a
NotFoundView for the view.
Updated by Christian Mueller about 1 year ago
- Has patch set to No
What would be a use-case for this again?
Updated by Christopher Hlubek about 1 year ago
Well, everytime you want to render a template that is not named by the action or you don't want to forward to another action to render its template. Of course in simple CRUD cases this is not needed. Some things I can think of are:
- Multiple templates depending on some value inside the action (I would consider switching to other partials inside one template a workaround)
- You cannot forward to another action (e.g. arguments not serializable) but want to render its template