Skip to main content
Toggle navigation menu
Submit a request
Sign in
<% var activeCategory = categories.filter(function(category) { return category.isActive || category.id === activeCategoryId })[0] %>
<% categories.forEach(function(category, index) { %> <% var firstSection = sections.filter(function(section) { return section.category_id === category.id })[0] %> <% var firstArticle = articles.filter(function(article) { return firstSection && article.section_id === firstSection.id })[0] || category %> <% var isActive = activeCategory && activeCategory.id === category.id %>
<%= category.name %>
<% }); %>
Twilio Simple
Was this article helpful?
0 out of 0 found this helpful
Yes
No
Popular Keywords
<% var maxSections = 5 %>
Toggle navigation menu
<% categories.forEach(function(category, index) { %> <% if (category.id === activeCategoryId) { %> <%= partial('partial-article-list-sections', { id: 'category-' + category.id, parent: category, sections: category.sections, activeCategoryId: activeCategoryId, activeSectionId: activeSectionId, activeArticleId: activeArticleId, maxSections: maxSections, partial: partial }) %> <% } %> <% }) %>
<% var maxSections = 5 %>
Toggle navigation menu
<% categories.forEach(function(category, index) { %>
<%= category.name %>
<%= partial('partial-section-list-sections', { id: 'category-' + category.id, parent: category, sections: category.sections, activeCategoryId: activeCategoryId, activeSectionId: activeSectionId, activeArticleId: activeArticleId, maxSections: maxSections, partial: partial }) %>
<% }); %>
Toggle navigation menu
Categories
<% categories.forEach(function(category) { %>
<%= category.name %>
<% }); %>
<% var isSubsection = parent.hasOwnProperty('parent_section_id'); %> <% if (sections.length) { %>
<% sections.forEach(function(section) { %>
<% if (isSubsection) { %>
<%= section.name %>
<% } else { %>
<%= section.name %>
<% } %> <%= partial('partial-article-list-sections', { id: 'section-' + section.id, parent: section, sections: section.sections, activeCategoryId: activeCategoryId, activeSectionId: activeSectionId, activeArticleId: activeArticleId, maxSections: maxSections, partial: partial }) %> <% if (section.articles.length && !isSubsection) { %>
<% section.articles.forEach(function(article) { %>
<%= article.title %>
<% }); %>
<% } %>
<% }); %>
<% } %>
<% var isSubsection = parent.hasOwnProperty('parent_section_id'); %> <% if (sections.length) { %>
<% sections.slice(0, maxSections).forEach(function(section) { %>
<%= section.name %>
<%= partial('partial-section-list-sections', { id: 'section-' + section.id, parent: section, sections: section.sections, activeCategoryId: activeCategoryId, activeSectionId: activeSectionId, activeArticleId: activeArticleId, maxSections: maxSections, partial: partial }) %>
<% }); %> <% if (sections.length > maxSections) { %>
See more
<% } %>
<% } %>