Re: [esteban] How to attached Page/Article to category?
Hi esteban,
>I would like to show on product 1 only submenu ... and on product 2 only submenu:
You can show only categories of a certain depth like this:
<?php foreach ($categoriesRecords as $categoryRecord): ?>
<?php if ($categoryRecord['depth'] <= 0) { continue; } // skip categories of depth 0 or lower ?>
Try increasing the 0 to 1 if you want to hide more categories.
There's also few options you can pass to getCategories() to control what it shows or doesn't show:
'rootCategoryNum' => '0',
// Only categories _below_ this one will be shown (defaults to 0 for all)
'categoryFormat' => 'showall',
// controls what to show or hide: showall, onelevel, twolevel, breadcrumb
>How to show this menu horizontal not in list?
The first step is to create an html mockup of what you want the horizontal menu to look like. All that code does is output a bulleted list. So you need to create the html first that shows how you want it to look then adjust the CMSB code to output HTML that matches your mockup.
Note, categories are a fairly new feature and a bit more complicated then the rest of CMSB. We are working on making them simpler, but for now it might take a little extra work to get them working the way you want.
Hope that helps.
Dave Edis - Senior Developer
interactivetools.com