Multiple Category Menus
4 posts by 2 authors in: Forums > CMS Builder
Last Post: November 12, 2010 (RSS)
By pcolvin - November 11, 2010
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...
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:
I hope this helps! Please let me know if you have any questions.
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
Chris
Re: [chris] Multiple Category Menus
By pcolvin - November 11, 2010
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?
Many thanks...
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...
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:
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.
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
Chris