1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Show all subcategories in Resource Manager list?

Discussion in 'Styling and Customization Questions' started by nrep, Feb 14, 2015.

  1. nrep

    nrep Well-Known Member

    I'm looking for a way to show all the resource manager sub-categories by default in the Resource Manager (i.e. fully expand the sidebar menu). It looks like I need to work on the resource_category_sidebar_list template to do this:

    Code:
    <ol>
    <xen:foreach loop="$categories" value="$_category">
        <li class="{xen:if '{$_category.resource_category_id} == {$category.resource_category_id}', selected}">
            <a href="{xen:link resources/categories, $_category}" {xen:if $_category.category_description, 'title="{xen:helper striphtml, $_category.category_description}" class="Tooltip" data-tipclass="resourceCategoryTooltip"'}>{$_category.category_title}</a>
            <span class="count">{xen:number $_category.resource_count}</span>
        </li>
        <xen:if is="{$_category.resource_category_id} == {$showChildId}">
            {xen:raw $childCategoryHtml}
        </xen:if>
    </xen:foreach>
    </ol>
    However, the "{xen:raw $childCategoryHtml}" part only shows the subcategories for the current category, so just editing out the surrounding "if" tags doesn't work.

    Any thoughts on how I can do this using templating?
     
  2. Arty

    Arty Well-Known Member

    You can't. Hierarchy is created in php code, not in template.
     
    nrep likes this.
  3. nrep

    nrep Well-Known Member

    Thanks Arty, as I feared!
     
  4. Kevin

    Kevin Well-Known Member

    I'm finding myself asking the same question as I'm only using a couple of RM categories and would prefer that they sidebar tree menu was expanded by default.

    Is the current answer the same as above, that there is no way to do it?
     

Share This Page