Showing sub categories
5 posts by 3 authors in: Forums > CMS Builder
Last Post: August 17, 2011 (RSS)
By andycal - August 15, 2011
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
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
Re: [andycal] Showing sub categories
By andycal - August 17, 2011
Re: [andycal] Showing sub categories
By robin - August 17, 2011
This link should help you out with the getCategories options
http://www.interactivetools.com/forum/gforum.cgi?post=88039;search_string=getCategories;#88039
Hope that helps,
Robin
Programmer
interactivetools.com