7 コメント

  • Kay
    コメントアクション Permalink

    Catriona Bowie could you please share the code from your template, it looks like the category template.

    0
  • Catriona Bowie
    コメントアクション Permalink

    Thanks for your response Kay but I'm not sure what you mean - I have had a look for templates in the settings and I can't find anything. Where could I find what you are looking for?

    0
  • Catriona Bowie
    コメントアクション Permalink

    I understand now what you mean! Our theme is Copenhagen and I will paste the code for categories below. I feel a bit out of my depth with fixing this myself so some help would be fantastic. Would the section at the end be the issue?

    <div class="container-divider"></div>
    <div class="container">
    <nav class="sub-nav">
    {{breadcrumbs}}
    {{search submit=false}}
    </nav>

    <div class="category-container">
    <div class="category-content">
    <header class="page-header">
    <h1>{{category.name}}</h1>
    {{#if category.description}}
    <p class="page-header-description">{{category.description}}</p>
    {{/if}}
    </header>

    <div class="section-tree">
    {{#each sections}}
    <section class="section">
    <h3 class="section-tree-title">
    <a href="{{url}}">{{name}}</a>
    </h3>
    {{#if articles}}
    <ul class="article-list">
    {{#each articles}}
    <li class="article-list-item{{#if promoted}} article-promoted{{/if}}">
    {{#if promoted}}
    <span data-title="{{t 'promoted'}}" class="icon-star"></span>
    {{/if}}
    <a href="{{url}}" class="article-list-link">{{title}}</a>
    {{#if internal}}
    <span class="icon-lock" title="{{t 'internal'}}"></span>
    {{/if}}
    </li>
    {{/each}}
    </ul>
    {{#if more_articles}}
    <a href="{{url}}" class="see-all-articles">
    {{t 'show_all_articles' count=article_count}}
    </a>
    {{/if}}
    {{/if}}
    </section>
    {{else}}
    <i class="category-empty">
    <a href="{{category.url}}">{{t 'empty'}}</a>
    </i>
    {{/each}}
    </div>
    </div>
    </div>
    </div>

    0
  • Kay
    コメントアクション Permalink

    Okay, so I've seen this happen when there are no (published) articles inside the section, inside the category.

    So when I quickly scan the template code you've shared. This is indeed the case.

    0
  • Catriona Bowie
    コメントアクション Permalink

    Hi Kay, the only problem is - all the sections have articles in them! There surely must be a way to get rid of this? We have just deleted the code at the bottom that should make that appear but this didn't work either. Is this a fault?

    0
  • Brett - Community Manager
    コメントアクション Permalink

    Hey Catriona,

    If you remove the following code  from your Guide template and then refresh your browser, does that resolve the issue for you?

    <a href="{{category.url}}">{{t 'empty'}}</a>

    Looks like that code is on line 46 in your template.

    Let me know!

    1
  • Catriona Bowie
    コメントアクション Permalink

    I got support from someone internally with this - I had removed the code from the 'Category' template as this was where 'empty' is showing but for some reason it is actually the 'Section' template that need to be editied 

    0

サインインしてコメントを残してください。

Powered by Zendesk