Drupal excessive menu parts

懵懂的女人 提交于 2019-12-11 10:03:54

问题


In a module development (webtv) I am providing a generic block that can be configured for its contents (playlists). On the configure form there is a list of added contents (playlists) along with links "add new playlist" and "edit" existing one placed next to each entry. As the block configuration path is: "admin/build/block/configure/[my_module_name]/[block_delta]".

And I am expecting to add/edit playlist form on a separate page and should be accessible on: admin/build/block/configure/[my_module_name]/[block_delta]/playlist/add and admin/build/block/configure/[my_module_name]/[block_delta]/playlist/[playlist_id]/edit

For this I added two entries in hook_menu with page callback as drupal_get_form and page argument as form defining function.

After clearing cache and running cron, links does not server playlist add/edit page but redirects to block configure page.

What am I doing wrong? Is it possible to extend block configure page into sub pages?


回答1:


The maximum allowed menu parts in a drupal(6) URL are limited to 7. In my problem I have quoted paths with 8 and 9 parts that was the issue.

 admin/build/block/configure/[my_module_name]/[block_delta]/playlist/add
 admin/build/block/configure/[my_module_name]/[block_delta]/playlist/[playlist_id]/edit

In Drupal 7 the limit is expanded to 9.

It can manually be changed in the file drupal/includes/menu.inc as define('MENU_MAX_PARTS', 12);



来源:https://stackoverflow.com/questions/3343259/drupal-excessive-menu-parts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!