Newbie question about Menus vs Linking to Pages structure on a Services Website
4 posts by 3 authors in: Forums > CMS Builder
Last Post: December 15, 2010 (RSS)
By (Deleted User) - December 13, 2010
The reason I'm using CMS Builder is to streamline things and make it easy to edit/add/remove/relocate content within the site. I find I'm having a ton of redundancy that I hope is unnecessary. I also am having a difficult time figuring out how to relate one menu to another.
Currently I have three sections in CMS builder that all ultimately reference the same things. The general layout is a horizontal menu with dropdowns when hovered on, a vertical menu on the left side that lists the exact same thing as the drop down from the horizontal menu, and a section that lists the services again with descriptions.
Example:
1) I have a Multi-record editor called "Services" which has a Name and a longer section for description.
2) Category Menu section that is formatted as a horizontal menu that produces a drop down of child links when you hover over a given parent link. For example, if you hover over Services, You get a drop down listing of each type of service we offer (Wedding, prom, etc.)
3) Category Menu section that is formatted as a vertical menu and is only a listing of services we offer (weddings, proms, etc.) This menu is incredibly redundant, as it is an exact list of the child links from the previous menu.
I am looking to figure out how to significantly reduce or eliminate the repetitiveness that exists with the current design.
I would have thought there would be one services section with a check box in each record to enable a given record to appear on both menus.
Re: [jkoveos] Newbie question about Menus vs Linking to Pages structure on a Services Website
By Jason - December 14, 2010
Your right, the second category menu can probably be removed. If it's just a list of services, the easiest way to get it would be to just output the names of the services that you've stored in the Services section.
Does this help?
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Newbie question about Menus vs Linking to Pages structure on a Services Website
By (Deleted User) - December 14, 2010
I guess where I'm a little lost is on how to have the side menu populate from the drop down (ie: on the services page, I want the side menu to be identical to the drop down that appears when you hover over service, without the parent category - in this case "Services" displaying.
Also not sure how to only pull the services, without also pulling the info from fleet, and any other drop downs. For example, if I have the following...
Home
Services
Wedding
Prom
Night Out
Ect...
Fleet
Sedan
SUV
Limo
Etc...
...How do I only pull up "Wedding Prom, Night Out, Ect..." on that side menu?
I am using this code currently in the footer, but in order for it to work the way I want, I had to create a separate section for each, which, ideally, I'd prefer not to have to do:
<div>
<?php foreach ($footer_quickRecords as $record): ?>
<?php if($record['depth'] == 0) : ?>
<?php echo $record['name'] ?><br/>
<ul>
<?php else : ?>
<li><a href="<?php echo $record['url'] ?>"><?php echo $record['name'] ?></a></li>
<?php endif; ?>
<?php if(($record['_isLastChild']) && ($record['depth'] == 1)) : ?>
</ul>
<?php endif; ?>
<?php endforeach; ?>
</div>
<br clear="all" />
<?php if (!$footer_quickRecords): ?>
No records were found!<br/><br/>
<?php endif ?>
Does that make sense? Any guidance greatly appreciated.
Re: [jkoveos] Newbie question about Menus vs Linking to Pages structure on a Services Website
By Chris - December 15, 2010
The getCategories function has an option called 'rootCategoryNum' which you can use to get only the categories "below" a given category. You can call getCategories a second time on the same section to get a different list of categories.
To use 'rootCategoryNum' for this, you'll need to know the record number ('num') of your services record. You can discover the record number of a record by modifying it in CMS Builder and looking at your browser's address bar.
For example:
list($completeMenuRecords, $selectedCategory) = getCategories(array(
'tableName' => 'my_section_name',
));
list($servicesRecords, ) = getCategories(array(
'tableName' => 'my_section_name',
'rootCategoryNum' => 123, // services record num
));
Does that help? Please let me know if you have any questions.
Chris