Skip to content

Instantly share code, notes, and snippets.

@albertromkes
Created January 27, 2014 18:21
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 albertromkes/8654418 to your computer and use it in GitHub Desktop.
Save albertromkes/8654418 to your computer and use it in GitHub Desktop.
@*Start of Component Presentation in View*@
@XPM.StartInlineEditingZone()
@* or for a 'submodel' (Component Presentation in a Component Presentation) *@
@XPM.StartInlineEditingZone(Model.Teaser)
@*Write out MarkUp and value*@
<h2>@XPM.Editable(m => m.Title)</h2>
@*Write out MarkUp and value separately*@
<h2>@XPM.MarkUp(m => m.Title) @Model.Title</h2>
@*Lists*@
@for (int i = 0; i < Model.RelatedArticles.Count; i++)
{
<li>@XPM.Editable(m => m.RelatedArticles[i].LinkTitle</li>
}
@*Region*@
<div>
@XPM.RegionMarkup("PageHeader")
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment