How can we add a description field under article names in our help center

10 Kommentare

  • PROVENTIC **** EMEA Reseller Partner
    Community Moderator

    Hi Marin

    Try adding: 

    {{excerpt article.body characters=100}}

    under the article title placeholder... You can of course adjust the number of characters to suit your use case.

    1
  • Marin

    Hey Carsten,

    Thanks for that code there. We're actually trying to show an excerpt underneath the article's name in the section view before clicking on the article. Do you know of a way to accomplish this? 

    0
  • PROVENTIC **** EMEA Reseller Partner
    Community Moderator

    Hi Marin

    Sorry - Since you are already looping through the articles the code should look like this:

    {{excerpt body characters=100}}

    1
  • Marin

    Hey Carsten,

    Thanks for all your help here -- that works great!

    Just one more question, is there a way to make it so that the excerpt shows for only a specific section and not all sections?

    Thanks again!

    0
  • PROVENTIC **** EMEA Reseller Partner
    Community Moderator

    Hi Marin

    The only one i can come up with (keep in mind that i am not a programmer) is this:

    If you wrap your excerpt in an is or isnt block you can control when the excerpt is printed, ie.:

    {{#is ../section.id 201591998}}{{excerpt body characters=100}}{{/is}}

    The down side is that you would have to have an #is line for each section where you want to print the excerpt - I might be easier to use #isnt instead.

    0
  • Yeny Rubiano

    Hello,

    I am trying to add the suggested excerpt: {{excerpt article.body characters=100}} into the Categories template; but, I am getting this error message:

    • Unable to preview 'Category page' due to invalid reference: {{article.body}} at line 34

    Any way I can display an article description on the Categories template?

     

    Thanks!



    0
  • Customer Support Theme

    Hello @Yeny Rubiano,

    Please use this one on your category template - 

    {{excerpt body characters=100}}

    If face any issue feel free to message us at info@customersupporttheme.com

    Thanks

    Support Team

    http://customersupporttheme.com

    (Experts in Zendesk Themes, Zendesk Help Center, Plugins, Help Center Branding and Customization.)

    0
  • Yeny Rubiano

    Thanks for the help. The excerpt worked on our Category template.

    0
  • Customer Support Theme

    @Yeny Rubiano, Thankyou! If need anything feel free to message us.

    (Experts in Zendesk Themes, Zendesk Help Center, Plugins, Help Center Branding and Customization.)

    0
  • Emil Pop

    Hello everyone.

    I am trying to add the suggestion given above to the category page template but I cannot make it work.

    I am adding the code inside category_page.hbs but cannot see the text that's inside the first article from the bottom.

    {{/if}}
    <a href="{{url}}" class="article-list-link">{{title}}</a>
    <p>{{excerpt body characters=50}}</p>
    {{#if internal}}
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" focusable="false" viewBox="0 0 16 16" class="icon-lock" title="{{t 'internal'}}">
    <rect width="12" height="9" x="2" y="7" fill="currentColor" rx="1" ry="1"/>
    <path fill="none" stroke="currentColor" d="M4.5 7.5V4a3.5 3.5 0 017 0v3.5"/>
    </svg>
    {{/if}}
    </li>
    {{/each}}

    Can you please help?

    Emil

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Powered by Zendesk