Skip to content

Instantly share code, notes, and snippets.

@herskinduk
Last active April 25, 2016 22:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Sitecore MVC Layout views
@using Sitecore.Mvc
@using Sitecore.Mvc.Analytics.Extensions
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title>@Html.Sitecore().Field("title", new { DisableWebEdit = true })</title>
@Html.Sitecore().VisitorIdentification()
<!-- output meta tag based on renderings in placeholder here ... -->
</head>
<body>
<h1>@Html.Sitecore().Field("title")</h1>
<div>
@Html.Sitecore().Placeholder("main")
</div>
</body>
</html>
@using Sitecore.Mvc
@{
Layout = "MVC2_Layout.cshtml";
}
<h1>@Html.Sitecore().Field("title")</h1>
<div>
@Html.Sitecore().Placeholder("main")
</div>
@using Sitecore.Mvc
@using Sitecore.Mvc.Analytics.Extensions
<!DOCTYPE html>
<html>
<head>
<title>@Html.Sitecore().Field("title", new { DisableWebEdit = true })</title>
@Html.Sitecore().VisitorIdentification()
<!-- output meta tag based on renderings in placeholder here ... -->
</head>
<body>
@RenderBody()
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment