Skip to content

Instantly share code, notes, and snippets.

@kgiszewski
Created November 20, 2014 16:54
Show Gist options
  • Save kgiszewski/af23add37727c499e22a to your computer and use it in GitHub Desktop.
Save kgiszewski/af23add37727c499e22a to your computer and use it in GitHub Desktop.
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@using Archetype.Models
@using Archetype.Extensions
@* Ensure that the Current Page has children, where the property umbracoNaviHide is not True *@
@if (CurrentPage.Children.Where("Visible").Any())
{
@* For each child page under the root node, where the property umbracoNaviHide is not True *@
foreach (var childPage in Model.Content.Children.Where("Visible"))
{
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" href="#HSCol-@childPage.Id"><i class="fa fa-plus-circle"></i>&nbsp;@childPage.GetPropertyValue("pageHeading")</a>
</h4>
</div>
<div id="HSCol-@Model.Content.Id" class="panel-collapse collapse">
<div class="panel-body">
@Html.RenderArchetypePartials(childPage.GetPropertyValue<ArchetypeModel>("bodyContentBlocks"))
</div>
</div>
</div>
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment