0

not sure if I can describe the situation clearly, here is the thing:

I am using D7. I have this site: there are three menu items in the main menu will lead to three product pages, their layout will be identical: start with a product image, then a secondary menu bar and the according content according to the secondary selected menu item. I intend to use a same custom node template for the three pages, and put different content into the fields I determined.

the secondary menu bar should be identical on all three pages, which may contains these menu items: Features, Technical Specs, Sales, Support.

When someone clicks on the main menu items, they will go to the product with the right image on the top and the url like mysite.com/PRODUCT_A. When someone then clicks the secondary menu items, the product image and the layout on the page remain the same, but the according content will show up in the content area. And the url will be mysite.com/PRODUCT_A#feature

A layout like this:


PRODUCT A | PRODUCT B | PRODUCT C

[PRODUCT B IMAGE]

features|technical specs|sales|support

[these are the features about PRODUCT B...]


Any I probably will use View for the content blocks, but I cannot get my head around how exactly I can make the whole thing dynamic enough for the administrator to add content comfortable. Also to get the right url dynamically. Any thoughts please? Thanks a lot!

1 Answer 1

0

If you are just using hashes to flip between hidden divs on the page, then the submenu needs to just be relative to the current location like | <a href='#sales'>sales</a> | and your main menu would just have the paths to the nodes like | <a href='product-a'>PRODUCT A</a> |

This might seem like a pointless answer, but if my assumption about you using the hashes to switch the tabs, then the solution is super simple. You just need to create the submenu in code in the template since the admin-based custom menu system won't let you do relative hashes (I don't think so anyway)

2
  • Hi, thanks, this is exactly what I am doing, I added the links into the node template, but I am not sure how to make the content dynamically shows up in the content area on click these menu items. Maybe I will use jquery + Views to do this, but I am not sure if this is the best way, still trying... Commented Jul 10, 2013 at 8:48
  • just use id attribs on the divs, and set up some jQuery to .hide() and .show() them. start out with all but one set to display: none;. Commented Jul 10, 2013 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.