XF 2.2 Menu items sub categories resources

Solution
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>
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>
 
Solution
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>
hi I'm trying to do the same thing. I tried this and it does not work. Here is the code I used:

<xf:if is="$xf.uri == link('resources/categories/traders.19/')">
<xf:page option="section">categoryNineteen</xf:page>
</xf:if>
I tried it at the top of the template and at the bottom. What did I do wrong?
 
Back
Top Bottom