Umbraco 7 - Partial View - List FAQs - OR List Child Subpages of a particular Document Type

 Umbraco 7: List Child Subpages of a particular Document Type


 @inherits Umbraco.Web.Mvc.UmbracoTemplatePage  
 @if (CurrentPage.Children("FAQ").Any())  
 {       
      <div class="toggle-main faq">  
      @foreach (var childPage in CurrentPage.Children("FAQ"))   
      {            
     <div class="toggle">  
       <div class="toggle-title">           
                     <!--FAQ title-->  
         <h3><!-- <i class="fa fa-question"></i> -->@childPage.faqquestion</h3>  
       </div>  
       <div class="toggle-content">           
                     <!--FAQ Detail-->  
         <div class="entry-content">  
           @childPage.faqanswer  
         </div>  
       </div>  
     </div>  
      }  
      </div>  
 }  

Comments

Popular posts from this blog

Umbraco - Reset the Admin Password via SQL Server

Create a .NET Contact Form that Gets the Last Url Visited in C# Can also be Used in Umbraco

Umbraco Macro for IFrame when Embedding Video, Vimeo Universal Player, or other types of IFrame on to a Page XSLT version and Razor Version