Showing sub categories

5 posts by 3 authors in: Forums > CMS Builder
Last Post: August 17, 2011   (RSS)

By andycal - August 15, 2011

Hiya all,

I've got two menus on my pages - a main menu across the top of the page and the sub menu down the right hand side.

So, I can use the example code given for the category menu to display the menu across the top but the minute I add a sub-menu it obviously tries to display that.

I've tried putting "where -> parentNum = 0" in the code but that just breaks it, so how can I acheive this?

Also, how can I display the sub-pages to the chosen parent?

Here's the page I'm trying to acheive:

http://bentley.cogress.co.uk/page.php?Knowledge-2

Any pointers would be really helpful!

Re: [andycal] Showing sub categories

By Jason - August 15, 2011

Hi,

If you only want to show top level categories, you can try the categoryFormat option.

For example:

list($categoryRecords, $selectedCategory) = getCategories(array(
'tableName' => 'my_categories',
'categoryFormat' => 'onelevel',
));


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [Jason] Showing sub categories

By andycal - August 15, 2011

Ahhh, brilliant. Is there a way of just showing the sub categories of the currently selected parent then? If I could do that then my problem is solved.

Re: [andycal] Showing sub categories

By andycal - August 17, 2011

Or maybe there's a list of all the parameters to use with this viewer somewhere? Have I missed that anywhere?