A few questions regarding menus in Drupal 7, I've been looking for solutions but can't quite seem to find anyone else having a similar issue.
Using the Bartik theme:
I have 2 menus - one is the Main menu and allows for me to set children to pages. I have a secondary menu that I do not want to be in the main menu but I do want to allow it to have children. When I add pages, I cannot select my secondary menu in the dropdown to allow my secondary links to have children. I can't even select my secondary menu as an option.
Here are my questions:
Can I allow for my secondary menu to have children without installing a module?
Can I change a setting to allow me to select my secondary menu instead of the main menu when creating pages (without installing a module)?
<main menu>
link 1
link 2
-- sublink 1
-- sublink 2
<secondary menu>
link 1
link 2
-- sublink 1
-- sublink 2
Can I allow for my secondary menu pages to have breadcrumbs without installing a module?
Thanks!
All menues have the same basic function, so yes you can add nodes to your secondary menu.
To make your secondary menu available, you need to change settings on each content type you want to use with this menu.
Go to admin > structure > content types
click "edit", go to "Menu Settings" tab, and enable the menu there.
Now when you create or edit a node of that type you should see that menu available.
Related
I am using ajaira theme for a simple wordpress website.
I am unable to add more than one active dropdown menu to the navigation bar at the top of the homepage.
Every time I knock up a new menu it seems to kick out the existing menu
Perhaps the issue exists because I can select only one Primary menu when making up the menu ?
The theme tells me that supports 3 menus - but that will refer to 3 menu locations across the page ( header footer etc ) not just limiting me to 3 menus in the navigation bar surely ?
Very green when it comes to coding but i will have a bash !
Any tips/pointers/suggestions would be welcome... thanks.
I only want to show the pages that do not have parents, and link the other pages from their parent pages.
I want to have a simple main menu: Home | Pages | About | Contact
About 8 pages are linked from the Pages page. At the moment, the menu has 12 items, which deforms the layout pretty badly.
I have tried making the pages private, unpublished, and other options, but that doesn't seem to be the way to do it. Is there a way I can just have only parent pages linked in the main menu?
You can edit the menu (under the appearance tab in the dashboard). (you may need to add a new menu and assign it to the main navigation menu. It sounds like you have the defaulted menu set-up.
Once you've added a menu and assigned it to the main navigation, you can uncheck "automatically add top-level elements" or its equivalent, and add/remove menu items. You can also change their hierarchy (independent of actual page hierarchy).
It's all so easy these days. Just Go to appearance>menus>click the little triangle next to the listed page name>click remove> don't forget to save ... all done!
Maybe you didn't set up a custom menu yet. Set up a custom menu first with the desired pages / links. If it doesn't show on your site, check custom memus are enabled in your theme.. this will help you setting up a custom menu: http://www.wpbeginner.com/wp-themes/how-to-add-custom-navigation-menus-in-wordpress-3-0-themes/
I'm new to Drupal, and I'm also building an N-tier hierarchical menu that I want to display sections at time based on the current $node->path.
The menu looks like this -
---Top
------Menu-1
---------Menu-2
------------Menu-3
------Menu-4
---------Menu-5
------------Menu-6
etc etc etc
Each menu is also a page content type in Drupal, so if the $node-path is /top/menu-3, I want to be able to grab only Menu-1 and all its children. As I'm saying this, it almost sounds like I need some xpath in here.
With the Menu Block module, you can create a block to display a menu just like the Drupal's menu built-in menu block but starting at a specific depth. In your example, you can create a block to display your menu starting at depth 2 (Menu 1 and Menu 4) and following the active item (ie. the menu item for the currently viewed page). When viewing Menu 1, Menu 2 or Menu 3, the block will display Menu 1 and its children. When viewing Menu 4, Menu 5 or Menu 6, the block will display Menu 4 and its children. And when viewing Top, the menu will be empty.
Also, it works with non-node pages.
i'm not entirely sure what you're trying to do, but it seems like the node hierarchy module could be your solution.
with this module you can create a node hierarchy which can automatically result in hierarchical menus, hierarchical paths, etc.
I'm using 2 different menus in 2 different blocks. They are enabled / disabled depending on the the pages users arevisiting.
Now, I have an issue with the breadcrumbs: they only work with the main menu and not the second one.
I need to automatically have the breadcrumbs the other menu as well.
thanks
Drupal's menu system sets only one active menu at a time: if you're trying to have two breadcrumbs at the same time on the same page, you're going to need to use menu_set_active_menu_name() to do some juggling back and forth.
However, if you're just trying to have one show up, consider using the Menu Breadcrumb module, which automatically sets the active menu based on the page. You also have the ability to set menu priority for pages that exist in more than one menu.
This question is not strictly programming related, however:
Drupal breadcrumbs follow the menu-items as they are enabled. Regardless of whether the menu-items are visible, and regardless of what menu(containers) hold the menu. Items that are not in the menu (such as nodes!) will not have a breadcrumb.
That said, there is an exception, modules can override the breadcrumb with drupal_set_breadcrumb(), if they do so, the last one to set the breadcrumb gets to set the breadcrumb. E.g. taxonomy module sets the breadcrumb on taxonomy-pages.
You could set the breadcrumbs hardcoded in a module.
You should investigate why breadcrumbs don't follow your menu's in this case.
You could investigate modules that allow tweaking the breadcrumb behaviour, such as hansel
I am using the Acquia Slate theme.
http://drupal.org/project/acquia_slate
I've setup my Secondary Menu to show up in "sidebar first" block. What I'm assuming is that when I select something from my Primary Menu (which I renamed) that the secondary menu would show up. This is not the case. I do have the secondary menu turned on and I'm on the latest Drupal 6 release.
Have a look. http://www.andyczerwonka.com. Under the Software Development menu at the top, I have a secondary menu. When I select that menu, the "sidebar first" block on the left is empty.
In order to have the secondary menu display nested primary menu items, eg:
primary 1
- secondary 1
- secondary 2
primary 2
you need to set the secondary menu source to be the same menu as the primary source. This is done at admin/build/menu/settings
Additionally, you need to make sure that items you want as secondary nav items are properly nested under a primary menu item.
Yep, this is one of the most confusing things to learn about Drupal. The secondary links block acts much differently form the secondary links element that you have in your theme.
This video really helped me on this issue: http://www.lullabot.com/node/444/play