Skip to content

Instantly share code, notes, and snippets.

@herskinduk herskinduk/Mvc1.cshtml
Last active Apr 25, 2016

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
You can’t perform that action at this time.