Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Poll
What is the best method for creating top and left nav that includes CMS pages
Use CMS Pages and manually code the menus using static blocks 5
Put content into categories and subcategories that are static block only so content menus show up in navigation 12
Neither - Use a 3rd party CMS system 1
Neither - I’ve got a better solution 3
Total Votes: 21
You must be a logged-in member to vote
Create Menus for CMS pages
 
DDMAN
Sr. Member
 
Total Posts:  179
Joined:  2008-01-08
 

I have about 100 CMS pages in magento and about 150 products divided into 30+ categories. I want to have the ability to create menus (both in the top navigation) as well as the left nav for those content sections. Currently the top nav and left nav are dynamically created from the catalog only.

Here is what I got + two proposed solutions…

I have the following content sections
- Resources
- News
- Community
- about us
- contact us

I have the shop section of the website which includes the products and categories.

Problem: I want to have a top NAV that says SHOP | RESOURCES | COMMUNITY | NEWS | ABOUT US | CONTACT US
I also want a left hand nav such that when someone clicks SHOP the left nav only displays the categories and products in SHOP. When someone clicks on Resources it only displays the subsections and content pages in the left nav associated with RESOURCES. Currently the top nav and left nav are dynamically created from the catalog.

How can I solve this problem?

Solutions: (choose your favorite and vote for it in the poll above)

#1
Create a static block for each of the following menus: resources, news, community, about us, contact us. Hand code the menu to link to the correct CMS pages and hand code the style such that it would float left in a CMS page when included at the top of a CMS page of content. Then Include the static block call on all CMS pages that you want that menu to appear on. When you need to change the menu you change it in the static block and it will update on all the CMS pages. For the Main Nav you would have to remove the dynamic code and hard code the main nav to include the CMS pages.

Pros: You can use CMS pages still, it separates content from products and categories
Cons: manual changing of all menus when changes are made to content pages or new pages are added.

#2
Create categories and subcategories for all your content pages. Set the categories to StaticBlock only and then either put the content in the category description or put it in a static block. If you put it in a static block then you will need to associate that static block to the category or subcategory that you created.

Pros: You can use the dynamic menus and create 2nd, 3rd level dynamic menus for products and content all together. No manual coding necessary
Cons: Mixing content with the catalog, having content in static blocks associated with categories may become hard to manage long run.

Do you have a different solution? What do you think about these two solutions? I’m trying to decide which one is better to use to get my content working and available in Magento. I hesitate to put my content pages in as categories because they are not categories… it just doesn’t feel right. Yet from a technical standpoint it looks like it will solve all my navigation menu issues and still be SEO friendly.

Mike

 
Magento Community Magento Community
Magento Community
Magento Community
 
gw468
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2007-12-16
 

I want to do a very similar thing on my site, with one addition. I plan to have one of my categories drop-down showing two subcategories that, when clicked, open external sites. I already know how to do this by manually coding it, but I would like to know if there is a way to do it in the back end.

Ideally, (read: FEATURE REQUEST) when you manage a category in the back end, in the “display mode” drop-down, there should be an option for “Link to external URL only”, a text box for typing in the URL, options for opening it in a new window or not, or even a text box for “custom code” where you could type any html code that you like (which would open up options to opening external URLs, showing hidden divs, or many other things via javascript). Maybe there’s another way already it place in the backend. If so, please let me know.

About your desire to do something different because it “doesn’t feel right”, I completely understand. However, if you can think of it as breaking your “site” down into categories instead of breaking your “catalog” into categories (as is implied in the back end), then it totally fits, IMO.

Thanks,
GW468

 
Magento Community Magento Community
Magento Community
Magento Community
 
gw468
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2007-12-16
 

If I’m understanding your question correctly, you don’t want the full navigation structure to show in the left nav, only the category that was clicked in the top nav, and all it’s subcategories.

Using my site as an example, if you click on the main category “shop” it opens a static block that I’ve created and it adds the class “active” to the li tag for the shop category. If you could have your left navigation dynamically built to match your top nav in structure, but change the UL from id="nav" to id="sideNav", then using css and “display:hidden” or “display:visible”, you could have it only show the categories that you want.

Here’s an example. Assume that this page is the static block that I mentioned above, with the class “active” added to the li tag for the category “shop”. There is one other category called resources. Assume that each category has sub-categories, but for simplicities sake, and because they don’t affect the outcome of the example, I’m not showing them here.:

<ul id="sideNav">
                    <
li class="level0 active">
<
a href="shop"><span>shop</span></a>
</
li>
                    <
li class="level0">
<
a href="resources"><span>Resources</span></a>
</
li>
                </
ul>

Then in your css, add this:

#sideNav li.level0 {display:hidden;}
#sideNav li.active {display:visible !important;}
This would hide all li tags (including the ul and li tags for their subcategories) except for the ones with the class “active”, hence showing only the active category and it’s subcategory. Again, this counts on your ability to make the side nav be dynamically built in the same way the top nav is built, but if that’s true, you won’t have to manually code anything, ever.

Hope this helps,
GW468

 
Magento Community Magento Community
Magento Community
Magento Community
 
ahmadTheGeek
Jr. Member
 
Total Posts:  3
Joined:  2008-07-17
 

Check this solution I hope it helps

http://www.magentocommerce.com/boards/viewthread/12462/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top