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: [chris] Multiple Category Menus

Chris,

This makes sense and I'll give it a try.

What would you suggest for the code to load the records for each section at the top of the page? Obviously I'll need to reference each table for the different sections in tableName. What would be the best way to do that?

<?php

require_once "cmsAdmin/lib/viewer_functions.php";

list($categoryRecords, $selectedCategory) = getCategories(array(
'tableName' => 'category',
'selectedCategoryNum' => '', // defaults to getNumberFromEndOfUrl()
'categoryFormat' => 'showall', // showall, onelevel, twolevel
));

?>


Many thanks...