So you can create various razor-views like...
- Filtered list
and use these as sub-templates for another script. This is especially practical if you want to re-use parts of templates.
How does it work? Here's an example how a main script could change Razor-Views based on a URL-Parameter
@if (Request.QueryString["feature"] == null)
@RenderPage("_2SexyContent Feature - List.cshtml");
@RenderPage("_2SexyContent Feature - Details.cshtml", Request.QueryString["Feature"]);
This could be used as follows
- You could create single-page Apps, where the other views are on the same page
- The main Content-Element of this module could have configuration-parameters, and this Content always be available in the sub-pages. You could still do things like @Content.Title
- You could also create apps which show the same data, but just vary the template
- You can re-use partial templates (for example a sub-template showing just one person, which is used at the bottom of a blog-app)
Try the View Management Demo App to discover it or read more in my blog post about this.