MVC and templates

Last updated Tuesday, August 30, 2016 in Sitecore Experience Platform for Developer
Keywords: Development

The following fields in the standard template are specific to MVC:

  • __Controller Name – specify the name of the MVC controller that is executed when the item is requested. You can also specify a GUID in this field. The GUID points to an item that is based on the Controller template.
  • __Controller Action – specify the controller action that is executed execute.

The following templates are specific to MVC:

  • Controller – use this template to specify name and action of a controller.
  • Model – specify the type to use as a model for an MVC view.
  • Controller rendering – specify the name and action of the controller you want to execute. If the controller returns any output, this output is rendered to the output stream.
  • Item rendering – specify if the item pointed to by the data source of the rendering should use the rendering definition stored in the item, using the __Renderers field.
  • View rendering – specify the MVC view that you want rendered.