Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
- <div id="formsDocsArea">
- @if(@Model.Content.HasValue("docsFolder") && @Model.Content.GetPropertyValue<string>("asHideShow") == "True"){
- var mediaRoot = @Model.Content.GetPropertyValue("docsFolder");
- <!-- comment -->
- foreach( var item in Umbraco.TypedMedia(mediaRoot).Children){
- if(@item.ContentType.Alias =="Folder" && Umbraco.TypedMedia(@item.Id).Children.Count() > 0){
- @listFolders("hs", @item, Umbraco.TypedMedia(@item.Id).Children.Count().ToString())
- } else if(@item.ContentType.Alias !="Folder" && @item.ContentType.Alias !="Image"){
- @listDloads("hs", @item)
- }
- }
- } else if(@Model.Content.HasValue("docsFolder") && @Model.Content.GetPropertyValue<string>("asHideShow") == "False"){
- var mediaRoot = @Model.Content.GetPropertyValue("docsFolder");
- <!-- comment -->
- foreach( var item in Umbraco.TypedMedia(mediaRoot).Children){
- if(@item.ContentType.Alias =="Folder" && Umbraco.TypedMedia(@item.Id).Children.Count() > 0){
- @listFolders("bullet", @item, Umbraco.TypedMedia(@item.Id).Children.Count().ToString())
- } else if(@item.ContentType.Alias !="Folder" && @item.ContentType.Alias !="Image"){
- @listDloads("bullet", @item)
- }
- }
- }
- </div>
- @helper listFolders( string HowList, IPublishedContent theFolder, string itemCount )
- {
- if(HowList == "hs")
- {
- <div class="panel-group @theFolder.Name.Replace(" ", "").ToLower()" id="accordion">
- <div class="panel panel-default">
- <div class="panel-heading">
- <h4 class="panel-title">
- <a class="accordion-toggle" data-toggle="collapse" href="#collapse@{@theFolder.Id}"><i class="fa fa-plus-circle"></i> @theFolder.Name (@itemCount)</a>
- </h4>
- </div>
- <div id="collapse@{@theFolder.Id}" class="panel-collapse collapse">
- <div class="panel-body">
- @foreach(var item in Umbraco.TypedMedia(@theFolder.Id).Children){
- @listDloads("hs", @item)
- }
- </div>
- </div>
- </div>
- </div>
- } else if(HowList == "bullet") {
- <h1>@theFolder.Name</h1>
- <ul class="list-unstyled">
- @foreach(var item in Umbraco.TypedMedia(@theFolder.Id).Children){
- @listDloads("bullet", @item)
- }
- </ul>
- }
- }
- @helper listDloads( string HowList, IPublishedContent theItem ){
- if(HowList == "hs")
- {
- <p><a href="@theItem.Url" target="_blank" class="docList">@theItem.Name</a></p>
- } else if(HowList == "bullet") {
- <li><a href="@theItem.Url" target="_blank" class="docList">@theItem.Name</a></li>
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement