Is there a theme out there that will let me use one menu for my content but have the parents displayed in one block and their children in another. For example 5 items in my menu and each has 3 children - the parent items appear in the header and when clicked cause their children items to show up in a sidebar?

Thanks

Comments

coreyp_1’s picture

That sounds like the default behavior of the Primary and Secondary links. Just configure them to both point to the same menu, and you should see the desired result.

- Corey

dckantor’s picture

yes that's the default but I can't seem to get them to split with parents in a top horizontal setup and the children in a sidebar. To get the inline display you have to let drupal do it's default display (in certain themes) which bypasses the blocks arrangement. Once you let it do that it's hard to then get the children to show up by specifying a place for the secondary ones. In addition i can't get children on the children to show up.

prestonso’s picture

Menu block is what you're looking for; it takes children of menus and separates them off into their own blocks that can be positioned anywhere. Simply go to Site building -> Blocks, click on "Add menu block", and configure as you please. As for children of children, you can specify the menu block to be fully expanded, children included.
___________________

Preston So
Creative Director
Monarch Digital, Colorado Springs
My near-dead non-Drupal site

___________________

Preston So

dckantor’s picture

Thanks, this is very close to what I want but has the following problem.

I have primary menu items 1, 2, 3, 4, ... Each with sub 1a,1b,1c ....

If I create a menu block to show the subs of primary item 1 then I see those all the time. Same with any other one of the primary items.

How can I cause a block with 1a,1b,1c to appear only when primary item 1 is selected. Then those disappear and are replaced with 2a,2b,2c when I select primary item 2.

prestonso’s picture

Change the block visibility on each of the menu blocks to only display on the items under primary link 1. For example, after selecting "Show on only the listed pages", insert "1" and "1/", separated by a line break. This will tell Drupal to display the block for the page linked to by primary link 1 and all pages under it, if you have Pathauto installed and configured. Otherwise, you should insert specific nodes into the text area, such as "node/119", etc.
___________________

Preston So
Creative Director
Monarch Digital, Colorado Springs
My near-dead non-Drupal site

___________________

Preston So

dckantor’s picture

Thanks this does what I need.

dckantor’s picture

What can I do with the following situatiion. In one of my submenus I have a quiz. Do I need to separately list evey page in the quiz as one on which I want the menu block to appear or is there a way to group them somehow and give one instruction to show every page of the quiz?

mndonx’s picture

The way I have done this in the past is with primary and secondary links, but then customizing where they sit in the page.tpl.php. Put this in your header region:

<?php if ($primary_links): { 
<div><?php print theme('links', $primary_links); ?></div>
<?php endif; ?>

Then in your sidebar region, drop this in:

<?php if ($secondary_links): ?>
<div><?php print theme('links', $secondary_links); ?></div>
<?php endif; ?>

The if statement will check to see if that should show on that page.

dckantor’s picture

In principle I like this solution better than listing the pages on which a block should appear. In practice though I think that because this code goes into the theme code it needs to be replicated in a new theme. Listing of pages on which to show a block however, is retained over during a theme change.

dckantor’s picture

What can I do with the following situatiion. In one of my submenus I have a quiz. Do I need to separately list evey page in the quiz as one on which I want the menu block to appear or is there a way to group them somehow and give one instruction to show every page of the quiz?

mndonx’s picture

Hi dckantor - I think you would just make sure that the URLs all begin with /quiz/, then make sure your menu is showing on all quiz* pages. Is that what you are looking for? The asterisk means it includes everything after it - like quiz/1 or quiz/fruit/apple, for example. Is that what you mean?

dckantor’s picture

Currently the individual parts of my quiz are all nodes. Each time a make a new question it is assigned it's own node so they are not in a quiz/ directory. Is there a way to put them in one??

thanks

mndonx’s picture

Giving your node a custom URL is different from placing it in a menu structure. The URL alias can be anything you want it to be - giving it the illusion (if need be) of being in a folder. Do you have the Path module enabled?

dckantor’s picture

I did not have path mod enabled but do now. Looks like it will work for what I need.

thanks