Re: [solar_sys] Active menu, and submenu
Hi solar_sys, welcome to the CMS Builder forum.
The software doesn't support that by default but you can add that feature yourself with some custom php code.
Note that this assumes you have a variable called $selectedCategory (which is the default configuration). $selectedCategory has a field called "lineage" which has a list of the record number for all the parent records. It looks like this ":1:6:23:". So we can check that. Here's some sample code:
<?php foreach ($lehe_ylesehitusRecords as $categoryRecord): ?>
<?php $isChildSelected = ($selectedCategory['num'] != $categoryRecord['num'] &&
preg_match("/:{$categoryRecord['num']}:/", $selectedCategory['lineage'])); ?>Basically this means: If the current category isn't the one that is selected, but _IS_ an ancestor or parent of the selected record.
You can then test that variable to bold the parents:
<?php if ($isChildSelected): ?><b><?php endif ?><a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a><br />
<?php if ($isChildSelected): ?></b><?php endif ?>Hope that helps!
Dave Edis - Senior Developer
interactivetools.com