XF 2.2 Menu items sub categories resources

HenrikHansen

Well-known member
In the menu I have inserted some menu items for caegories in the RM, and it works fine, but when clicked, they are not highlighted,
instead "resources" are highlighted, which confuses the users, see fx here

Any good ideas to solve this?
 

Brogan

XenForo moderator
Staff member
You will need to edit the xfrm_category_view template and add this code for each tab:

HTML:
<xf:if is="$xf.uri == link('resources/categories/example-category.1/')">
    <xf:page option="section">categoryOne</xf:page>
</xf:if>

Change the link URL and the nav tab ID as required.

You can use elseif if you have several tabs:

HTML:
<xf:if is="$xf.uri == link('resources/categories/example-category.1/')">
    <xf:page option="section">categoryOne</xf:page>
<xf:elseif is="$xf.uri == link('resources/categories/example-category.3/')" />
    <xf:page option="section">categoryThree</xf:page>
</xf:if>
 
Top