@functions { string CalcuClassify(string[] zoneNames, string classNamePrefix) { var zoneCounter = 0; var zoneNumsFilled = string.Join("", zoneNames.Select(zoneName => { ++zoneCounter; return Model[zoneName] != null ? zoneCounter.ToString() : "";}).ToArray()); return HasText(zoneNumsFilled) ? classNamePrefix + zoneNumsFilled : ""; } } @{ Style.Include("http://fonts.googleapis.com/css?family=Lobster&subset=latin"); Style.Include("site.css"); // cool stuff goes up here var homeUrl = Href("~/"); // Zone is an alias for Display Func Zone = x => Display(x); //Add classes to the wrapper div to toggle zones on and off if (Model.AsideFirst != null && Model.AsideSecond == null) { Model.Classes.Add("has-aside-one"); } else if (Model.AsideFirst == null && Model.AsideSecond != null) { Model.Classes.Add("has-aside-two"); } else if (Model.AsideFirst != null && Model.AsideSecond != null) { Model.Classes.Add("has-asides"); } else { } // Debug Quad // {WorkContext.Layout.FooterQuadSecond.Add("2 This is some test text to see if zones are working. This is some test text to see if zones are working.");} // {WorkContext.Layout.FooterQuadFirst.Add("1 This is some test text to see if zones are working. This is some test text to see if zones are working.");} // {WorkContext.Layout.FooterQuadThird.Add("3 This is some test text to see if zones are working. This is some test text to see if zones are working.");} //Add classes to the wrapper div to toggle quad widget zones on and off var tripelClass = CalcuClassify(new [] {"TripelFirst", "TripelSecond", "TripelThird"}, "tripel-"); if (HasText(tripelClass)) { Model.Classes.Add(tripelClass); } //Add classes to the wrapper div to toggle quad widget zones on and off var footerQuadClass = CalcuClassify(new [] {"FooterQuadFirst", "FooterQuadSecond", "FooterQuadThird", "FooterQuadFourth"}, "split-"); if (HasText(footerQuadClass)) { Model.Classes.Add(footerQuadClass); } Model.Id = "layout-wrapper"; var tag = Tag (Model, "div"); // 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

} using(Capture(pbo => WorkContext.Layout.Footer.Add(pbo) )) {
Powered by Orchard © The Theme Machine 2010.
} WorkContext.Layout.Footer.Add(New.User()); } @tag.StartElement @if (Model.Header != null) {
} @if (Model.Navigation != null) {
@Zone(Model.Navigation)
} @if (Model.Featered != null) { } @if (Model.BeforeMain != null) {
@Zone(Model.BeforeMain)
}
@if (Model.AsideFirst != null) { }
@if (Model.Messages != null) {
@Zone(Model.Messages)
} @if (Model.BeforeContent != null) {
@Zone(Model.BeforeContent)
} @* the model content for the page is in the Content zone @ the default position (nothing, zero, zilch) *@ @if (Model.Content != null) {
@Zone(Model.Content)
} @if (Model.AfterContent != null) {
@Zone(Model.AfterContent)
}
@if (Model.AsideSecond != null) { }
@if (Model.AfterMain != null) {
@Zone(Model.AfterMain)
} @if (Model.TripelFirst != null || Model.TripelSecond != null || Model.TripelThird != null) {
@* as in beer *@ @if (Model.TripelFirst != null) {
@Zone(Model.TripelFirst)
} @if (Model.TripelSecond != null) {
@Zone(Model.TripelSecond)
} @if (Model.TripelThird != null) {
@Zone(Model.TripelThird)
}
} @tag.EndElement