Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sitecore 8 MVC layout for embedding in webforms
@using Sitecore.Mvc
@using Sitecore.Mvc.Analytics.Extensions
@using Sitecore.Mvc.Presentation
@model RenderingModel
@{
Layout = null;
}
@if (Sitecore.Context.PageMode.IsExperienceEditor && Sitecore.Context.Device.Name != "Ajax")
{
<!DOCTYPE html>
@:<html>
<head>
<title></title>
@Html.Sitecore().VisitorIdentification()
</head>
@:<body>
}
<div>
@Html.Sitecore().Placeholder("main-mvc")
</div>
@if (Sitecore.Context.PageMode.IsExperienceEditor && Sitecore.Context.Device.Name != "Ajax")
{
@:</body>
@:</html>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.