I seem to have reached some limit with Drupal 7 Menu system. I just added a menu item using the menu system at admin/structure/menu/manage/menu-main-menu. I added a new entry and it is not appearing on the List Links page. Believing there was an error, I added it 3 more times, none have displayed on the List Links page.
I examined the database table for menu_links and the table shows the presence of the 4 entries. I have no idea if all related tables are set up correctly, or if the menu system aborted setting up all related table entries correctly, but, menu_links definitely displays the name of the entry 4 times, and they are displayed as entries 1201, 1202, 1203, 1204.
Is 1200 the limit for creating menu links??? If there is no limit, is there some way I can recover from what is happening? Do I need to adjust some variable to increase the number of links that can be displayed on a menu LIST LINKS page? Currently, I have 107 entries one this one LIST LINKS page. Other links (of the 1200) are scattered around in small menus for administration and my application.
For those needing the information, I have identified the answer to my problem.
Drupal's menu system allows you to create new menu links via the administrator's menu setup, but, the menu link will not display in the administrative menu list if the page has not been published.
Setting the page to published added the links to the menu list.
Related
I am stuck with wordpress menu. Can't add more menu in one of my site. Don't know why. I think it's riced it's limit. Do u have any solution. I would like to add more than 500 menu / submenu item in my menu.
Thank you
Long Answer
Each menu item contains several elements (11-12), all of which are posted when the menu form is submitted, everything from the menu id, the order, the menu title, the associated item, the nonce, etc. So, when you submit a menu with 100 items, you're actually submitting about 1100 separate values. Generally, that size is limited by the max_input_vars setting in php.ini. So, when you attempt to submit the menu form that contains more POSTed values that is allowed, the extras are not submitted, and thus the extra items you added to your menu are lost. This is an intentional setting so that people cannot bring your server to its knees by submitting a massive post with millions and millions of pieces of data that is then processed.
tl;dr
Increase the max_input_vars value in your php.ini to something like 10,000, I bet it's right around 5,000 now.
The WordPress Menu (Appearance -> Menus) feature, itself, does not limit the number of menus or menu items you can have.
It's possible that the Theme you're using limits the number of items in a single Menu, but that's not likely (common practice) unless you have multiple levels of sub menus beyond 2 or 3.
A Menu of Pages that exceeds a couple dozen is unusual and an indication you're using Pages and the respective Menu feature improperly. In other words: why do you have 500 Pages? In such cases it's usually best to use the wp_list_pages() PHP Function in your Theme (assuming you're a programmer) because you have more control over placement and filtering of it's output.
However, I agree with the comment on your thread that your details are vaugue. If this answer isn't helpful then you should explain what "menu" feature you're referring to, where you're seeing this limit, and why you have so many Pages.
I have a menu in Drupal in the following structure:
-Gallery
--Gallery Item 1
--Gallery Item 2
--Gallery Item 3
--Gallery Item 4
-Videos
--Video Item 1
--Video Item 2
--Video Item 3
The Gallery and the Video items in the menu should be loaded dynamically from the content type gallery. My problem is that I don't know how to programmatically build and add menus items in the mentioned structure.
Thanks!
As I have mentioned here, Menu Views is an interesting module for Drupal 7 to automatically generate menu links using Views. It integrates seamlessly with menu modules such as Superfish and Nice Menus.
(PS: my reputation is not high enough to provide more than two links, therefore I have marked the other modules bold instead of providing hyperlinks)
-There's a module only available for Drupal 6 and below called Auto Menu - You can look at the source code and see how it's done, and convert it into a Drupal 7 module. Suggestion: Since its maintainers haven't committed for a long time, it's a chance for you to help out in the Drupal community by submitting your new module for Drupal 7.
-Alternatively, you can use the Views module and create a block to show the titles of your nodes as links, filtering by your desired Content Types and ordering by Content Type as well (to show Gallery items first, then the Video items).
-Plus, check out previous threads on this here and here.
I have a news page that is a View that dynamically pulls in the latest news nodes. The actual view page was easily integrated into the menu. We are using the menu block module because we have the navigation split.
The problem is that any of the articles that the news view pulls in aren't associated with a menu, so when navigated to the menu block disappears.
How can we associate those items dynamically without having to manually add all news nodes as sub-items to the news page?
(We are on drupal 6)
Context module (drupal.org/project/context) allows you to create contexts based conditions, including path or node type, as well as reactions, such as displaying blocks or menus. You could set the context to your node type, and then create a reaction that displays your menus, sidebars etc.
i have got a menu structure like this:
-menu item level 1
--menu item level 2
---menu item level 3
all items are linking to the same node. now, if i visit the node only the first two items are displayed. what i found out is: when i change the link of the first level menu item to something else, all level get displayed right.
menu modules i use:
Menu block
Menu Settings per Content Type
Menu Trails
Administration menu
Auto Menu Title
Hierarchical Select
any ideas?
thanks
lukas
googletorp is right-- Drupal's core menu system isn't designed to handle this. However you can use a workaround.
Let's say that you'd like to create a nested menu in which one of the children links to the same path as its parent. Something like:
people/friends
people/friends
people/family
people/neighbors
This works in theory-- the menu items will take you to the correct page. But if you're relying on Drupal to correctly set the active trail and expand the correct sub menus, you'll have to use a bit of a workaround. You're basically going to create dummy nodes that will redirect to the desired page rather than creating two menu links that have the exact same path. The parent (in menu) will redirect to the child's node.
Method 1 (D6 only):
Download and install CCK Redirection
Create a Content Type 'Redirect Node' and add a CCK Redirection field to the content type
Create a page node (node 1) with URL "people/friends" and add a menu link
Create a 'Redirect Node' (node 2) and create a menu link for this new node.
Set CCK Redirection field to the URL node 1 (people/friends).
Set node 2's menu item to be the parent of node 1's
Method 2 (D6&7):
If you want to get really fancy, you can take a more user friendly approach by combining CCK's Node Reference module with the Rules module.
Download and install the Rules module (and Rules UI) and enable CCK's Node Reference module
Create a Content Type 'Redirect Node' and add a Node Reference (D6) (D7) field 'field_redirect_target'. Be sure to configure this so that it is required, and users cannot select nodes of type 'Redirect Node'
Add a new rule via the Rules module when content is going to be viewed if content is of type 'Redirect Node'
Redirect to page: [node:field_redirect_target-path]
Create node 1 of type page
Create node 2 of type 'Redirect Node'
Set Node Reference field to Node 1
Set node 2's menu item to be the parent of node 1's
This method is a bit nicer for users, since it doesn't require them to find the system path for the target node.
Depending on your setting, the menu module will show the active link it it's children. It is, however, not designed to search for more than a single link. This is why you wont get the full nested menu structure. My guess is, that the top one is the link it finds first, and that is where it stops. I can't remember the algorithm for the menu structure, you might have luck rearranging the menu structure, making menu 1 the last child. This is, however, not something the Drupal menu system is designed for, and you will not have an easy time changing this.
What are you trying to accomplish by linking the same node several times is a nested menu structure?
I solved my problem using menu first child. I didn't look at the code it uses, but it simply works. It's really a bummer that this doesn't work out of the box and you have to use such workarounds. But actually this increased usability for my case.
I am building a website www.etutornetwork.com, in top menu I have included a link to a new content type [services]. I want to add a link in dropdown menu as soon as I publish new content in services.
Please Help, Thanks in advance.
and one more question, I dont want to give any name to one of the menu in the site. I tried using or leaving it blank, but it does'nt like this.
You can attach it in node creation time (see Menu fieldset), or use module like Auto Menu. Some more details about this module (from its project page):
The Auto Menu module automatically generates menu entries on node creation/edition. Parent menu item can be specified on a per content type basis.
This module acts when the menu section of a node is left empty only. So, users can still organize menus manually. Moreover, default setting for content types is to not create menu items automatically.
I use Taxonomy Menu, to create my secondary menu. It is very flexible to use. Some more details about this module (from its project page):
Features
Custom Menu per vocabulary
Uses the default taxonomy term path or custom paths
Integrate with Views
Integrate with Pathauto: use URL/path aliases
Does not interfere with other menu modules
You can take away the permission from users dealing with menus. Then when you are publishing submitted content from them, you can assign them a menu entry and control the title.
Other than that, you could use Views (since Services is a content type) to create a block that lists all Services with links directly to the node.
Either way, someone will have to title the nodes/menu items. It's easier administrative wise to remove menu permissions from users submitting content.