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

RM 1.0 Add categories section to sidebar on resource page

Morgain

Well-known member
#1
I think when looking at a resource the reader should be able to see what the options are to go elsewhere without being dependent on one navig only on bre\adcrumbs - users like good clear sidebars - and I dont like single dependency navig - weak.

This is code copied and given a section div, from resource_index to resource_view

Code:
<xen:comment>ADD CATEGORY MENU</xen:comment>
<div class="section">
    <div class="secondaryContent categoryList">
        <h3>{xen:phrase categories}</h3>
        <xen:if is="{$categories}">
            <ol>
            <xen:foreach loop="$categories" value="$_category">
                <li class="{xen:if '{$_category.resource_category_id} == {$selectedCategoryId}', 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:foreach>
            </ol>
        <xen:else />
            <div>{xen:phrase n_a}</div>
        </xen:if>
    </div>
    </div>
Location is above <xen:hook name="resource_view_sidebar_below_info"

Problem is I only get the shell. It's using the ELSE to display N/A
not showing my categories.
 

Morgain

Well-known member
#3
Can someone help please? I know exciting things are happening but please ... ? It's my birthday Monday!

I really want the sidebar to be consistent at all three levels so the landing page, the category page, and the resource view page all display the same Categories menu top right.