How to Create Sitecore Mvc Layout and Controller Rendering

2017/12/152 min read
bookmark this
Responsive image

Table of Contents

  1. Create a Sitecore Page with MVC Layout and Controller
  2. Create Layout at Sitecore
  3. Set Sitecore location for new Layout file
  4. Set Sitecore Mvc Layout's cshtml file location
  5. Create new DefaultLayout1.cshtml at visual studio
  6. Sitecore Layout Detail
  7. DefaultLayout1.cshtml detail
  8. Create Sitecore Controller Rendering
  9. Add Controller name and action name at sitecore
  10. Create Controller at Visual Studio Mvc Project
  11. Sitecore Page Layout Detail
  12. Change Sitecore page to use different Layout
  13. Layout Detail - add Sitecore Controller Rendering
  14. Device Editor
  15. Select the new Rendering
  16. Sample Controller Rendering
  17. Page use new Layout and new Mvc Controller
  18. Create new Page and Submit via Worlflow
  19. Approve Workflow
  20. Publish and see changes

This blog demo how to create use MVC Layout and Controller with Sitecore Layout and Controller Rendering. The final source you can get from here.

Create a Sitecore Page with MVC Layout and Controller

Create Layout at Sitecore

Set Sitecore location for new Layout file

Set Sitecore Mvc Layout's cshtml file location

Create new DefaultLayout1.cshtml at visual studio

Sitecore Layout Detail

DefaultLayout1.cshtml detail

Create Sitecore Controller Rendering

Add Controller name and action name at sitecore

Create Controller at Visual Studio Mvc Project

Sitecore Page Layout Detail

Change Sitecore page to use different Layout

Layout Detail - add Sitecore Controller Rendering

Device Editor

Select the new Rendering

Sample Controller Rendering

Page use new Layout and new Mvc Controller

Create new Page and Submit via Worlflow

Approve Workflow

Publish and see changes