Multiple Category Menus

4 posts by 2 authors in: Forums > CMS Builder
Last Post: November 12, 2010   (RSS)

Just wondering if anyone has done anything using multiple Category Menu Sections and brought them all together to display on one navigation menu.

The site I am currently building is going to have several people maintaining the content. When they log into CMSB they will only have access to their specific section. It would be nice if they could add additional pages via the Category Menu but only in the area of the site they have access rights to. With everything under one Category Menu Section, they would have access to everything unless I not aware of a way to control this access.

Thanks in advance...

Re: [pcolvin] Multiple Category Menus

By Chris - November 11, 2010

Hi pcolvin,

This should certainly be possible. Each of your Category Menus will be a branch of your navigation tree. You'll want to hard-code the "root" of your tree. Here's an example:

<ul>
<li>
Home
</li>
<li>
Sales
<ul>
<?php foreach ($salesCategoryRecords as $categoryRecord): ?>
...
<?php endforeach ?>
</ul>
</li>
<li>
Support
<ul>
<?php foreach ($supportCategoryRecords as $categoryRecord): ?>
...
<?php endforeach ?>
</ul>
</li>
</ul>


I hope this helps! Please let me know if you have any questions.
All the best,
Chris

Re: [pcolvin] Multiple Category Menus

By Chris - November 12, 2010

Hi pcolvin,

I'd simply copy-and-paste the getCategories code, changing the names of your variables and tables:

list($salesCategoryRecords, $selectedSalesCategory) = getCategories(array(
'tableName' => 'sales_category',
));
list($supportCategoryRecords, $selectedSupportCategory) = getCategories(array(
'tableName' => 'support_category',
));


If you need to use "selected categories", things become a little more complicated because you can't simply use getNumberFromEndOfUrl (since the number might refer to a sales or a support category!)

Please let me know if you have any questions.
All the best,
Chris