Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sitecore 6.5 with MVC3

I have to use Sitecore 6.5 with MVC framework and as per the reference document I can setup Sitecore and make that running. I have created MVC3 .NET web application project (blank and using Razor) and I dot know following things

  1. How do I setup Layouts and Sublayouts? (this must be different then web form I guess)
  2. What do I have to do to use Sitecore data controls e.g. FieldRenderer, Text etc. (I guess without those controls it will be not easy for us to use provide Page Editing mode)
  3. How do I use Sitecore placeholders in MVC?

I have used this document as a reference.

like image 217
Jigs Avatar asked Apr 04 '12 13:04

Jigs


2 Answers

At present Sitecore MVC support is setup so that ASP.NET MVC can work alongside a Sitecore installation under the same hostname.

Full support for using MVC with Sitecore will be coming in the 6.5.1 update around June time. At that point all of the things you mention plus other stuff like populating the viewbag with context data will be possible.

There are ways to achive certain parts of this integration such as a shared source module that allows Razor usage. I have personally written a small module that lets you use MVC routes with sitecore items (Sitecore MVC Routing) but for full MVC support you will have to wait until June.

like image 119
Stephen Pope Avatar answered Nov 01 '22 22:11

Stephen Pope


Someone has made a proof of concept of the things that you want.

This blog post explains it all: http://www.chrisvandesteeg.nl/2012/02/26/sitecore-mvc/

like image 44
Ruud van Falier Avatar answered Nov 01 '22 23:11

Ruud van Falier