Statically add a Rendering to a layout

Recently I stumbled across this excellent note from Nathanael Mann – Did you really mean .Controller() in Sitecore MVC? – it’s worth a read.

The short form – you’ll want to use:

@Html.Sitecore().Rendering("[GUID of the Rendering]", new { Cacheable=true, Cache_VaryByData=true })

… so you don’t skip caching.

 

Advertisement
Statically add a Rendering to a layout

SharePoint vs (?) ASP.NET MVC

I’ve been studying ASP.NET MVC 4 over the last while; this is the subject of second of the 4 exams required for the SharePoint Developer MCSD, and I really need to spend some time on that.

The idea of an MVC (Model-View-Controller) framework is to separate the different concerns of your code, and that usually this allows you to design a data model, and then let your tools create a scaffolding of your site. Such things aren’t new; I implemented a Chinese Chess web site in Ruby on Rails which uses this approach in 2005. I loved the MVC approach. Continue reading “SharePoint vs (?) ASP.NET MVC”

SharePoint vs (?) ASP.NET MVC