Menu & CSS Help
3 posts by 3 authors in: Forums > CMS Builder
Last Post: August 22, 2011 (RSS)
Hi Everyone
I have a current website with a menu system that I would like to setup to work with CMSB. This is the code I am using:
Normally, I would use the following, however I'm not exactly sure how I can use the css code to define the look & feel of the menu.
Any ideas would be greatly appreciated.
Ragi
I have a current website with a menu system that I would like to setup to work with CMSB. This is the code I am using:
<ul class="nav">
<li>
<h2 class="nav">Main Menu</h2>
<ul class="nav">
<li class="menucontent"><a title="Recruiting">Recruiting</a>
<ul class="nav2">
<li><a class="menulink" href="info_e.php" title="Recruiting Information">Information</a></li>
<li><a class="menulink" href="member_e.php" title="Membership Requirements">Membership Requirements</a></li>
<li><a class="menulink" href="reqdocs_e.php" title="Required Documents">Required Documents</a></li>
</ul>
<li class="menucontent"><a title="Training and Orders">Training and Orders</a>
<ul class="nav2">
<!-- <li><a class="menulink" href="timings_e.php" title="Weekly Schedule">Weekly Schedule</a></li> -->
<li><a class="menulink" href="dressregs_e.php" title="Dress Regulations">Dress Regulations</a></li>
<li><a class="menulink" href="promotions_e.php" title="Promotions">Promotions</a></li>
<li><a class="menulink" href="dutyncm_e.php" title="Duty Personnel">Duty Personnel</a></li>
<li><a class="menulink" href="summertrg_e.php" title="Summer Training">Summer Training</a></li>
</ul></ul></ul>
Normally, I would use the following, however I'm not exactly sure how I can use the css code to define the look & feel of the menu.
<ul>
<?php foreach ($category_topRecords as $category_topRecord): ?>
<?php echo $category_topRecord['_listItemStart'] ?>
<?php if ($category_topRecord['_isSelected']): ?>
<?php endif; ?>
<?php if ($category_topRecord['open_in_new_page'] == "1"): ?>
<b><a href="<?php echo $category_topRecord['uri'] ?>" rel="self" target="_blank"><?php echo $category_topRecord['name'] ?></a></b>
<?php else: ?>
<a href="<?php echo $category_topRecord['uri'] ?>" rel="self"><?php echo $category_topRecord['name'] ?></a>
<?php endif; ?>
<?php if ($category_topRecord['_isSelected']): ?>
<?php endif; ?>
<?php echo $category_topRecord['_listItemEnd'] ?>
<?php endforeach; ?>
</ul>
Any ideas would be greatly appreciated.
Ragi
--
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
northernpenguin
Northern Penguin Technologies
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Re: [northernpenguin] Menu & CSS Help
By zip222 - August 22, 2011
It's not necessary to include all of those classes in your HTML, when you can instead use the cascading aspect of CSS to target the various levels of your navigation. example...
This approach allows you to keep your html very clean and simple.
.nav {
}
.nav h2 {
}
.nav li a {
}
.nav li li a {
}
This approach allows you to keep your html very clean and simple.
Re: [northernpenguin] Menu & CSS Help
By robin - August 22, 2011
Hey,
If you want to integrate your CMS Builder categories into your existing layout you can change the content of the foreach loop to match your layout.
Something like:
Hope that helps,
Robin
If you want to integrate your CMS Builder categories into your existing layout you can change the content of the foreach loop to match your layout.
Something like:
<li><a class="menulink" href="<?php echo $category_topRecord['uri'] ?>" title="<?php echo $category_topRecord['name'] ?>"><?php echo $category_topRecord['name'] ?></a></li>
Hope that helps,
Robin
Robin
Programmer
interactivetools.com
Programmer
interactivetools.com