Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Show the subsections of each section from the category page
<div class="inner-wrap kb search-hero-container">
<section class="hero-unit search-box clearfix">
<h2>{{dc 'HM003'}}</h2>
<div class="search-inner">
<input type="search" class="st-default-search-input"/>
</div>
</section>
</div>
<div class="inner-wrap">
<nav class="sub-nav clearfix category-breadcrumbs">
{{breadcrumbs}}
</nav>
<section class="category-sections clearfix">
<h4>{{dc 'dc006'}}</h4>
<div id="tabs" class="tabs">
<ul class="ui-tabs-nav tabs-nav">
{{#each sections}}
<li><a href="#tabs-{{id}}">{{name}}
<span>({{t 'post_count' count=article_count}}) </span>
</a>
</li>
{{/each}}
</ul>
{{#each sections}}
<div id="tabs-{{id}}" class="ui-tabs-panel tabs-panel">
<h3>{{name}}</h3>
<p class="category-description">{{description}}</p>
{{#if articles}}
<ul>
{{#each articles}}
<li><a href="{{url}}">{{title}}</a></li>
{{/each}}
</ul>
{{#if more_articles}}
<a href="{{url}}" class="more-link">
{{t 'show_all_articles' count=article_count}}
</a>
{{/if}}
{{/if}}
<div class="section-tree">
{{#each sections}}
<section class="section">
<h3 class="section-tree-title">
<a href="{{url}}">{{name}}</a>
</h3>
</section>
{{/each}}
</div>
</div>
{{/each}}
</div> <!-- end tabs -->
</section>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.