How to put all sections and articles on home page



image avatar

Vlad

The Wise One - 2022Community Moderator

Posted Feb 23, 2017

Please follow this short tutorial about how to put all sections and articles on the home page of your Help Center (according to this post). There are few ways to achieve that, but I will explain one of them, probably the most easiest.

Example: https://support.twilio.com/hc/en-us

So:

  • Put all the content (all sections) in just one category (how to do that)

  • Go to editor for design changes (General / Customize design / Home page)
  • Find code row provided under, and remove it and whole code in this section (if you can't find it, just skip this step):
    <section class="knowledge-base">
  • Put here this code
    <section class="knowledge-base">
    {{#if categories}}
    <div class="category-tree">
    {{#each categories}}
    <section class="category">
    {{#if ../has_multiple_categories}}
    <h2><a href="{{url}}">{{name}}</a></h2>
    {{/if}}
    {{#each sections}}
    <section class="section">
    <h3>
    {{#if internal}}
    <span class="visibility-internal" data-title="{{t 'internal'}}">
    <span class="visibility-internal-icon"></span>
    </span>
    {{/if}}
    <a href="{{url}}">{{name}}</a>
    </h3>
    {{#if articles}}
    <ul class="article-list">
    {{#each articles}}
    <li {{#if promoted}} class="article-promoted" {{/if}}>
    {{#if promoted}}
    <span data-title="{{t 'promoted'}}">★</span>
    {{/if}}
    <a href="{{url}}">{{title}}</a>
    </li>
    {{/each}}
    </ul>
    {{#if more_articles}}
    <a href="{{url}}" class="see-all-articles">
    {{t 'show_all_articles' count=article_count}}
    </a>
    {{/if}}
    {{else}}
    <i class="section-empty">
    <a href="{{url}}">{{t 'empty'}}</a>
    </i>
    {{/if}}
    </section>
    {{else}}
    <i class="category-empty">
    <a href="{{url}}">{{t 'empty'}}</a>
    </i>
    {{/each}}

    {{#if more_sections}}
    <div>
    <a href="{{url}}">{{t 'see_all_sections'}}</a>
    </div>
    {{/if}}
    </section>
    {{/each}}

    {{pagination}}
    </div>
    {{/if}}
    </section>
  • Save and Publish changes. You should get your sections and articles on the home page of your Help Center.

    Hope this helps, if not, feel free to put a comment under!

 

 

 

 

 


1

26

0 comments

Sign in to leave a comment.

Didn't find what you're looking for?

New post