Setup navigation
6 posts by 4 authors in: Forums > CMS Builder
Last Post: August 26, 2012 (RSS)
By samsam92 - March 29, 2010
We would need some help because we've been looking around the forum for answers, which we found partially but can't figure out the following problem:
- We have a website with different menu/submenus that needs to be self manageable, in our case:
o Home
o About
>> Our Staff
>> Testimonials
o Projects
>> Project 1
>> Project 2
o News
o Services
>> Page name
>> Page name 2
...
Each page has to be customized (so it has a different editor, for example our Staff page will have a multiple Record type, and each record will have Name, Title, Function, Photo, Bio... the news page on the other hand will have more basic info such as Title, Short description, Long description, and so on.
What we can’t figure out is how to set up the section editors so we can create those pages and be able to have a top navigation menu on the website that will show those menu items without integrating it manually?
We are able to create each editors with no problems, but creating a Category Menu won’t allow to have different type of pages underneath it, or creating a Menu, not sure how to have all elements within the menu listed on the frontend so it shows the top navigation...
The goal to achieve is for example if the backend user adds a new page under About Us, that the main navigation on the frontend automatically displays this new page as a subnavigation
Please help, that would be really appreciated
Thanks a lot
Re: [samsam92] Setup navigation
By Chris - March 30, 2010
I think the simplest way to accomplish this (and the approach I would take) is to decide which parts of your navigation menu can be static. For example, you could drive the menu you posted above with three sections: About Pages, Projects, and Services. Your menu could be:
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about.php">About</a>
<ul>
<?php foreach ($about_pagesRecords as $record): ?>
<li><a href="<?php echo $record['_link'] ?>"><?php echo htmlspecialchars($record['title']) ?></a></li>
<?php endforeach ?>
</ul>
</li>
<li><a href="/projects.php">Projects</a>
<ul>
<?php foreach ($projectsRecords as $record): ?>
<li><a href="<?php echo $record['_link'] ?>"><?php echo htmlspecialchars($record['title']) ?></a></li>
<?php endforeach ?>
</ul>
</li>
<li><a href="/news.php">News</a>
<li><a href="/services.php">Services</a>
<ul>
<?php foreach ($servicesRecords as $record): ?>
<li><a href="<?php echo $record['_link'] ?>"><?php echo htmlspecialchars($record['title']) ?></a></li>
<?php endforeach ?>
</ul>
</li>
</ul>
If you don't like that approach, an alternate solution would be to use a Category Menu, where each record has both "title" and "url" fields. That's a little more complicated because you'll need to figure out the URL to the new page you've created and remember to add an entry in your navigation section for it.
I hope this helps. Please let me know if you have any questions.
Chris
Re: [chris] Setup navigation
By samsam92 - March 30, 2010
I actually created a new section called top navigation in which I've added the Navigation Titles / URLs and display those elements in the page in a separate viewer.
I hope in the future releases that there will be some kind of easy navigation management.
Take care
Re: [Chris] Setup navigation 4 tier category menu
By Mikey - April 29, 2012 - edited: April 29, 2012
I've been racking my brains on something a bit more complicated than this original thread for hours upon hours now...
I'm trying to build a 4 tier category driven horizontal mega menu, similar to what you can see here.
http://nettuts.s3.amazonaws.com/819_megamenu/demo/index.html Only mine will have multi-level subcategories listed below the parent category. I need to menu to active upon roll over, not once clicked. And I just cant figur out the code need to get the records from CMS Builder to make this happen.
Can you explain the cms builder code needed to achieve categories as parent, child, grand child and great grandchild:
o Home
o About
> Tier One page
> Tier One page
o Projects
> Tier One page
> Tier One page
>> Tier Two page
>>> Tier Three page
>>>> Tier Four page
> Tier One page
o News
o Services
> Tier One page
> Tier One page
>> Tier Two page
>>> Tier Three page
>>>> Tier Four page
> Tier One page
>> Tier Two page
>>> Tier Three page
> Tier One page
> Tier One page
http://www.interactivetools.com/iforum/Products_C2/CMS_Builder_F35/gforum.cgi?post=89145;t=search_engine
http://www.interactivetools.com/forum/gforum.cgi?post=64259#64259
I've read these pages till I'm blue in the face and browsed the forum over and over again... and I'm just not getting it. Any help would be greatly appreciated.
Re: [zick] Setup navigation 4 tier category menu
By Mikey - August 25, 2012
Such as:
o Services
> Tier One page
> Tier One page
>> Tier Two page
>>> Tier Three page
>>>> Tier Four page
> Tier One page
>> Tier Two page
>>> Tier Three page
> Tier One page
> Tier One page
Thanks Zick
Re: [zick] Setup navigation 4 tier category menu
By Jason - August 26, 2012
The first thing to do is to find a drop down menu script. I've found that the best ones are the ones that are based on a simple nested <ul> structure. I've used this script successfully a number of time:
http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm#
As far as what you need to do with CMS Builder, set up your category menu. Then retrieve the records using getCategories().
Finally, you can out put your nested category structure like this:
<ul>
<?php foreach ($categoryRecords as $category): ?>
<?php echo $category['_listItemStart'];?>
<a href = "<?php echo $category['_link'];?>"><?php echo $category['name'];?></a>
<?php echo $category['_listItemEnd'];?>
<?php endforeach ?>
</ul>
Hope this helps
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/