How can I remove the "empty" link?

8 Comments

  • Amie B

    Hey Carlo,

    When you see the word "Empty" in your HC, it generally means that the category or section you've created and are looking at as an agent on the HC, is empty. Meaning there are no articles inside it. 

    I believe the empty word only shows up to admins/agents. If the category or section is empty, then it just simply would not appear to the end-user when your HC is public. 

    Hope this helps you from here with this one. :)

    Best,

    Amie

    0
  • Carlo

    Hi Amine, thanks.

    It seems I see it also in the incognito mode:

     

    1
  • Maggie Ungerboeck
    Community Moderator

    Hi Carlo,

    This thread and the link Brett points to may be helpful in removing the empty phrase:

    https://support.zendesk.com/hc/en-us/community/posts/360029294774-Flexible-hierarchy

    Hope that helps!

    Thanks,
    Maggie

    0
  • Liz W

    I have this problem too.

    If a section contains subsections but no free-standing articles (that is, if all articles in that section are contained within subsections), then our Help Center lists the subsections but adds a meaningless "Empty" link under them.

     

    I remember reading somewhere in Zendesk's documentation that "Empty" appears when there are no articles directly in a section. If the section is actually empty, that's great, but it makes NO sense and is pretty confusing in this context, when the section is not empty at all but full of many articles divided into subsections. As you can see in Carlo's screen shot and mine, there are subsections in this section. It is not empty.

    The link Maggie posted discusses what to do if the subsections are not appearing, but it does not address the problem Carlo and I are experiencing: "Empty" appearing along with the subsection titles.

    I've tested this from the End User view as well, and it looks the same.

    Anyone found a workaround or have any suggestions?

    Thanks!

    1
  • Chad Susa

    Same problem here Liz - it really doesn't make sense if we are using multiple section hierarchy.

    So it seems we have to have at least one article in each section to remove the empty link...so strange. Pretty sure it's an oversight as I can't think of any reason why this should be an un-editable setting.

    Would love to know a workaround too.

    0
  • Chad Susa

    It's actually very easy to fix.

    • Go to your Guide template code and open the section_page.hbs
    • Look for a block of code like this (usually line 62 - 66):
     {{else}}
    <i class="section-empty">
    <a href="{{section.url}}">{{t 'empty'}}</a>
    </i>
    {{/if}}
    • Remove the word empty leaving the two ' intact but no space between them
    • Save and publish.

    Should look like this:

    {{else}}
    <i class="section-empty">
    <a href="{{section.url}}">{{t ''}}</a>
    </i>
    {{/if}}
    2
  • Brett Bowser
    Zendesk Community Team

    Thanks for sharing the solution here Chad! This would make an excellent user tip in our User Tips and Tricks topic to help provide visibility to others.

    Would you be willing to cross-post this solution there? If you're unsure how to submit a user tip, check out this post: How to write & submit a tip for the community

    Thanks again!

    0
  • Liz W

    Yes, thanks so much, Chad! That was very helpful.

    In case this is useful for anyone else: At first I thought it wasn't working when I tested it, but then I realized I was viewing the list of sections and subsections on a category page. I went back into the theme and made the exact same update in category_page.hbs as well. Now the misleading "empty" is gone in both places.

    Perfect!

    1

Please sign in to leave a comment.

Powered by Zendesk