@{ Style.Include("site.css"); // cool stuff goes up here var homeUrl = Href("~/"); // Zone is an alias for Display Func Zone = x => Display(x); if (Model.Sidebar != null) { Model.Classes.Add("has-sidebar"); } //Model.Attributes.Add("onclick", "javscript:alert('woot')"); Model.Id = "layout-wrapper"; var tag = Tag (Model, "div"); } @* Add a wrapping div around everything *@ @tag.StartElement @* needs to be the page title, not page (head) title... *@ @* Adds text and html to the header zone *@ @using(Capture(branding => WorkContext.Layout.Header.Add(branding) )) {

@WorkContext.CurrentSite.SiteName

}
@if(Model.Header != null) { }
@if(Model.Navigation != null) { }
@if(Model.Messages != null) {
@Zone(Model.Messages)
} @* This code would inject text into the Featured zone. @{WorkContext.Layout.Featured.Add("just some text in featured");} *@ @{ WorkContext.Layout.Featured.Add(New.Featured(insertMessage:"This is a featured blog post.")); } @if(Model.Featured != null) { } @{ WorkContext.Layout.Recent.Add(New.Recent()); } @if(Model.Featured != null) {
@Zone(Model.Recent)
} @{WorkContext.Layout.Sidebar1.Add("just some text in featured");} @if(Model.Sidebar1 != null) { } @* the model content for the page is in the Content zone @ the default position (nothing, zero, zilch) *@ @if(Model.Content != null) {
@Zone(Model.Content)
} else {
Let's take over the home page
} @if(Model.Sidebar != null) { }
@{ WorkContext.Layout.Footer.Add(@Display.User()); } @if(Model.Footer != null) { } else { } @tag.EndElement