Help Center : Promoted Articles showing locked icon

Répondu

3 Commentaires

  • Marie-Cathrine

    Hi Salim,

    A lock icon next to an article title is indicating that the article is set to only be visible for agent and admins in the article settings. If this is not the case, the icon is most likely placed in a wrong place on the home page:

    {{#if promoted_articles}}
          <section class="articles">
            <h2>{{t 'promoted_articles'}}</h2>
            <ul class="article-list promoted-articles">
              {{#each promoted_articles}}
                <li class="promoted-articles-item">
                    <a href="{{url}}">
                      {{title}}

                      {{#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}}
                    </a>
                </li>
              {{/each}}
            </ul>
          </section>
        {{/if}}

    As you see here (the thing in bold), the icon should be wrapped in an if internal statement in order for it to only show if the article is internal (visible to only agent and admins).

    I hope this helps :)

    #helpsome regards,
    Marie-Cathrine Sørensen
    Developer @ helphouse.io

    0
  • Salim Moumouni

    There are set to be visible to all , here is the home page code.

     {{#if promoted_articles}}
          <section class="section articles">
             <h1 class="promoted-article-title">{{t 'promoted_articles'}}</h1>
             <ul class="article-list promoted-articles">
                {{#each promoted_articles}}
                <li class="promoted-articles-item">
                   <a href="{{url}}">
                      {{title}}
                      <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>
                   </a>
                </li>
                {{/each}}
             </ul>
          </section>
          {{/if}}
    0
  • Salim Moumouni

    Got it , thanks!

    0

Vous devez vous connecter pour laisser un commentaire.

Réalisé par Zendesk