Skip to content

Commit

Permalink
Merge pull request #2 from magento-devdocs/yb-ghost-sidebar-entries
Browse files Browse the repository at this point in the history
Add a check for a page.title to remove ghost items
  • Loading branch information
belbiy committed Nov 20, 2017
2 parents ce7d974 + 5e511a4 commit 91d229c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _includes/layout/sidebar-nav-tree-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{% assign children = children | where_exp: 'page', 'page.dir != include.page.dir' | sort: 'menu_order' %}
{% assign children_size = children | size %}

{% if include.page.title %}
<li {% if include.page.url == page.url %}class="active"{% endif %}>
<a href="{{ site.baseurl }}{{ include.page.url }}">{% if include.page.menu_title %}{{ include.page.menu_title }}{% else %}{{ include.page.title }}{% endif %}</a>
{% if children_size > 0 %}
Expand All @@ -12,3 +13,4 @@
</ul>
{% endif %}
</li>
{% endif %}

0 comments on commit 91d229c

Please sign in to comment.