Enable article preview below title



  • Simon Celen

    Hi Henry,

    If you're looking to show the first few lines of the article on a section page you could do that with some minor theme customization.

    Following the linked instructions, edit your theme's section_page.hbs file, look for the block of code below and add the line in bold:

    {{#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>
    <a href="{{url}}" class="article-list-link">{{title}}</a>
    {{#if internal}}
    <span class="icon-lock" title="{{t 'internal'}}"></span>

    <p class="excerpt">{{excerpt body}}</p>
    <i class="section-empty">
    <a href="{{section.url}}">{{t 'empty'}}</a>


    This shows the first 120 characters of each article. You could go higher if needed by using f.e.:

    <p class="excerpt">{{excerpt body characters=200}}</p>


    I'm assuming you're on a stock Copenhagen theme but the same principles apply to other themes as well.


    Hope that helps!


Please sign in to leave a comment.

Powered by Zendesk