I am using the Copenhagen theme controls to display the Article list in the collapsible sidebar on the articles and the sections page. (Ideally, I want a full tree control with all sections, subsections, and hierarchies, but the partners have not figured this out yet.
Because I am displaying only articles in the same section, I'd like them to display expanded by default. Right now they expand collapsed. Could you please help me to expand by default? Looks like it should be.
My JS from Copenhangen
// Toggles expanded aria to collapsible elements
$(".collapsible-nav, .collapsible-sidebar").on("click", function (e) {
e.stopPropagation();
var isExpanded = this.getAttribute("aria-expanded") === "true";
this.setAttribute("aria-expanded", !isExpanded);
console.log (isExpanded);
});
My HBS
{{!--Copehangen sidebar--}}
<section class="article-sidebar">
<section class="section-articles collapsible-sidebar">
<h3 class="collapsible-sidebar-title sidenav-title">{{t 'articles_in_section'}}</h3>
<ul>
{{#each section.articles}}
<li>
<a href="{{url}}" class="sidenav-item {{#is id ../article.id}}current-article{{/is}}">{{title}}</a>
</li>
{{/each}}
</ul>
{{#if section.more_articles}}
<a href="{{section.url}}" class="article-sidebar-item">{{t 'see_more'}}</a>
{{/if}}
</section>
</section>
