Skip to main content
Mentorloop Help Hub
Toggle navigation menu
Mentors and mentees
Program coordinators
Log in
Program Coordinators
Empowering you to manage your mentoring program
Search
Featured articles
Get Started
Managing Your Program
PC Academy
<% var promotedArticles = articles.filter(function(article) { var section = sections.filter(function(section) { return section.id === article['section_id']; })[0] || null; return article.promoted === true && section && section['category_id'] === 4766437257615 }); %> <% if (promotedArticles.length) { %>
Featured articles
<% promotedArticles.forEach(function(article) { %>
<%= article.title %>
<% }); %>
<% } %>
Popular searches:
<% categories.forEach(function(category) { %>
<% if (category.id === activeCategoryId) { %>
<%= category.name %>
<% } else { %>
<%= category.name %>
<% } %> <% if (category.sections.length) { %>
<% category.sections.forEach(function(section) { %>
<%= section.name %>
<% }); %>
<% } %>
<% }); %>
Categories
<% categories.forEach(function(category, index) { %>
<%= category.name %>
<%= partial('partial-article-list-sections', { id: 'category-' + category.id, parentId: '#sidebar-article-navigation', sections: category.sections, activeCategoryId: activeCategoryId, activeSectionId: activeSectionId, activeArticleId: activeArticleId, partial: partial }) %>
<% }); %>
<% var maxSections = 5 %>
Toggle navigation menu
<% categories.forEach(function(category, index) { %>
<%= category.name %>
<%= partial('partial-section-list-sections', { parent: category, sections: category.sections, maxSections: maxSections, partial: partial }) %>
<% }); %>
Categories
Categories
<% categories.forEach(function(category) { %>
<%= category.name %>
<% }); %>
<% if (sections.length) { %>
<% sections.forEach(function(section) { %>
<%= section.name %>
<%= partial('partial-article-list-sections', { id: 'section-' + section.id, parentId: '#' + id, sections: section.sections, activeCategoryId: activeCategoryId, activeSectionId: activeSectionId, activeArticleId: activeArticleId, partial: partial }) %> <% if (section.articles.length) { %>
<% section.articles.forEach(function(article) { %>
<%= article.title %>
<% }); %>
<% } %>
<% }); %>
<% } %>
<% if (sections.length) { %>
<% sections.slice(0, maxSections).forEach(function(section) { %>
<%= section.name %>
<%= partial('partial-section-list-sections', { parent: section, sections: section.sections, maxSections: maxSections, partial: partial }) %>
<% }); %> <% if (sections.length > maxSections) { %>
See more
<% } %>
<% } %>
<% var activeSection = sections.filter(function(section) { return section.id === activeSectionId })[0] || null; var siblingSections = sections.filter(function(section) { return activeSection && activeSection['category_id'] === section['category_id'] && activeSection['parent_section_id'] === section['parent_section_id']; }) %> <% if (siblingSections.length) { %>
<% siblingSections.forEach(function(section) { %>
<% if (section.id === activeSectionId) { %>
<%= section.name %>
<% } else { %>
<%= section.name %>
<% } %> <% if (section.sections.length) { %>
<% section.sections.forEach(function(subsection) { %>
<%= subsection.name %>
<% }); %>
<% } %>
<% }); %>
<% } %>