Category Menu Question

12 posts by 2 authors in: Forums > CMS Builder
Last Post: May 14, 2009   (RSS)

By ross - May 11, 2009

Hi there.

Great!

Next step is as follows. In your sub nav code, find this code:

<div class="submenu">
<a href="currentDetail.php?<?php echo $record['num']; ?>"><?php echo $record['title'] ?></a><br/>
</div>


and replace it with this:

<div class="submenu">
<?php if ($record['num'] == $investmentRecord['title']): ?>
<span class="selected">
<?php endif ?>
<a href="currentDetail.php?<?php echo $record['num']; ?>"><?php echo $record['title'] ?></a><br/>
</span>
</div>


What that's going to do is check the category number from your sub nav list with the category number from the detail page you are viewer. If it's a match, the code will insert a span tag. Once you add this code, you can create your self a new class on your stylesheet to control how the selected item appears.

Now, keep in mind that my code assumes that on your investment table, the category is stored as a number.

Give this a shot and let me know how you make out.

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/