Skip to content

Instantly share code, notes, and snippets.

Created January 10, 2013 11:06
Show Gist options
  • Save anonymous/4501275 to your computer and use it in GitHub Desktop.
Save anonymous/4501275 to your computer and use it in GitHub Desktop.
UI 2012 examples
@using DD4T.Mvc.Html
@model DD4T.ContentModel.IComponentPresentation
<div>
@Html.SiteEditComponentPresentation(Model)
<h1>@Html.SiteEditField(Model, Model.Component.Fields["title"])@Model.Component.Fields["title"]</h1>
</div>
<!-- _Layout.cshtml -->
<html>
<head></head>
<body>
<!-- Rest of code -->
@RenderSection("SiteEditSettings", false)
<!--SITE_EDIT_INIT-->
</body>
</html>
@using DD4T.Mvc.Html
@model DD4T.ContentModel.IPage
@{
Layout = "~/Shared/_Layout.cshtml";
}
<!-- Code -->
@Html.RenderComponentPresentations()
@section SiteEditSettings {
@Html.SiteEditPage(Model)
}
?xml version="1.0" encoding="utf-8"?>
<siteEdit enabled="true" style="SiteEdit2012" tridionHostUrl="http://your-tridion/">
<contextPublications>
<contextPublication id="9" componentPublication="5" pagePublication="9" publishPublication="9" />
</contextPublications>
</siteEdit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment