Subsections working in Copenhagen but not in Custom
AnsweredI don't quite understand the instructions on how to insert subsections
- Section
section.sections
- Insert the following snippet into the Zendesk section page template, wherever you want to display the list of subsections:
"wherever you want to display" --> does that mean that I cannot just paste the snippet into, and that I have to look for a specific place inside section_page.hbs?
I was planning to insert after {{#if section.articles}}
This is the boilerplate that comes with Copenhagen
<div class="container-divider"></div>
<div class="container">
<nav class="sub-nav">
{{breadcrumbs}}
{{search submit=false}}
</nav>
<div class="section-container">
<section class="section-content">
<header class="page-header">
<h1>
{{section.name}}
</h1>
{{#if settings.show_follow_section}}
{{subscribe}}
{{/if}}
{{#if section.description}}
<p class="page-header-description">{{section.description}}</p>
{{/if}}
</header>
{{#if section.articles}}
<ul class="article-list">
{{#each section.articles}}
<li class="article-list-item {{#if promoted}} article-promoted{{/if}}">
{{#if promoted}}
<span data-title="{{t 'promoted'}}" class="icon-star"></span>
{{/if}}
<a href="{{url}}" class="article-list-link">{{title}}</a>
{{#if internal}}
<span class="icon-lock" title="{{t 'internal'}}"></span>
{{/if}}
</li>
{{/each}}
</ul>
{{else}}
<i class="section-empty">
<a href="{{section.url}}">{{t 'empty'}}</a>
</i>
{{/if}}
****** this is where I plan to paste the snippet******
{{pagination}}
</section>
</div>
</div>
-
Hi Miriam - you should be able to insert your subsections code where you have indicated. In the Copenhagen demo it's inserted before {{# if section.articles}}, but that shouldn't make a difference.
You'll only have access to this if you're a Guide Enterprise customer, and you'll only see the content if you've created subsections within the section you're looking at.
-
thank you Chris!
-
Welcome to the Zendesk Community, Miriam!
Please sign in to leave a comment.
3 Comments