css and category menus

12 posts by 3 authors in: Forums > CMS Builder
Last Post: December 1, 2009   (RSS)

By Chris - December 1, 2009

Hi GraphicLingoes,

Try this:

<?php foreach ($categoryRecords as $record): ?>
<?php
$html = $record['_listItemStart'];
if ($record['_isSelected']) {
$html = preg_replace('/<li>/', '<li class="selected">', $html);
}
echo $html;
?>
<a href="<?php echo $record['_link'] ?>"><?php echo $record['name'] ?></a>
<?php echo $record['_listItemEnd'] ?>
<?php endforeach ?>


You may need to change the code in red to match your own configuration.

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