Skip to content

Instantly share code, notes, and snippets.

@janlowgren
Created November 26, 2019 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janlowgren/3062c85495c5cc2f396a3183683cdc19 to your computer and use it in GitHub Desktop.
Save janlowgren/3062c85495c5cc2f396a3183683cdc19 to your computer and use it in GitHub Desktop.
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