I'm trying to do this on 5.3 but the code above doesn't work.
I've added a main "Shop" menu item to the template, and now just need to pupolate the UL with the categories.
I've tried adding this code as copied from /skins/customer/categories/tree/body.twig but it's not working for some reason? I get an Internal Server Error
Code:
<li class="leaf has-sub"><span>Shop</span>
<ul>
{% for idx, _category in this.getCategories(this.rootId) %}
<li {{ this.displayItemClass(idx, loop.length, _category)|raw }}>
<a href="{{ _category.link }}" {{ this.displayLinkClass(idx, loop.length, _category)|raw }}>{{ _category.name }}</a>
{% if _category.subcategoriesCount %}
{{ widget(template=this.getBody(), rootId=_category.id, is_subtree='1') }}
{% endif %}
</li>
{% endfor %}
{% for idx, w in this.getViewList('topCategories.children', {'rootId': this.getParam('rootId'), 'is_subtree': this.getParam('is_subtree')}) %}
<li {{ this.displayListItemClass(idx, loop.length, w)|raw }}>{{ w.display() }}</li>
{% endfor %}
</ul>
</li>
__________________
X-Cart version 5 (Previously 3.5-4)
Previous Versions included
BCSE Reward Points Mod
Altered Cart On Sale Mod
Wordpress Plugin
Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there.
Shout me a Coffee!