category page filtering

2 posts by 2 authors in: Forums > CMS Builder
Last Post: December 16, 2014   (RSS)

By jeffsaitz - December 15, 2014

Hello, I have a section of my category page that is public.  Meaning... when a user clicks on "end of year 2014" on my homepage - www.edmundsassoc.com/support - they are taken to the category page without having to login.  Only the "end of year section" should be visible on the left side menu of this page.  However, curently nothing is being displayed.  I have the function below that governs what is being shown.  how do i make it so the category is shown instead of it being blank like it currently is:

function liStyle($category) {
if ($category['depth'] == 0) { return ""; }

if ($category['depth'] == 1 && $category['_isSelectedBranch']) { return ""; }
if ($category['_isSelected'] || $category['_isChildSelected'] || $category['_isParentSelected'] || $category['_isSiblingSelected']) { return ""; }

return " style = 'display:none;' ";
}

Jeff Saitz

By claire - December 16, 2014

Hi Jeff

I can see that the categories are definitely being loaded on that page at least.

I'd recommend checking to see what categories are being loaded on the page, and whether they're passing the liStyle function successfully. It's clear that all of them are having the display: none style applied, so that's where the issue must be.

In the page header, use the following function:

showme($categories);

to have the categories' raw data output at the top of the page. Then compare each category to the conditions in the function to see where the logic is failing.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/