Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
Just installed your module. Added a new menu "Region" and added a few items to it. All works fine, I then copied the menu-block-wrapper-MENUNAME.tpl.php to my theme and changed its name to menu-block-wrapper-Regions.tpl.php, made a few small changes just to test it but none of my changes showed! I then noticed that when I went to admin/build/menu/list and noticed my "Regions" menu has the path menu-regions assigned to it, so I changed the menu-block-wrapper-Regions.tpl.php to menu-block-wrapper-menu-regions.tpl.php but still no luck!
What am I doing wrong?
Comments
Comment #1
dnewkerk CreditAttribution: dnewkerk commentedTested this with primary links, using the exact file name given in the Help text, and my changes in the template file (after refreshing the theme registry) are not seen. May be a bug.
Comment #2
ludo1960 CreditAttribution: ludo1960 commentedCan anyone offer any insight into this problem?
Comment #3
JohnAlbinUnfortunately, that's a known design flaw/bug in the D6 Theme System.
Read the first paragraph of http://drupal.org/node/190815#template-suggestions carefully.
So you'll need a menu-block-wrapper.tpl.php file in your theme as well.
[edit]
Also, I noticed:
That means the tpl will need to be called menu-block-wrapper-regions.tpl.php. "regions" is the machine-name of your new menu.
[/edit]
Comment #4
ludo1960 CreditAttribution: ludo1960 commentedThank you very much for taking the time to explain the problem, sorry that it was a known issue, my mistake.
Oh, and thanks for a great module too!
Best Regards...
And consider the page http://drupal.org/node/190815#template-suggestions well and truly bookmarked!!!
Comment #6
enrique.delgado CreditAttribution: enrique.delgado commentedJust a note for D7 users. To get this to work, I had to follow this file name pattern:
menu-block-wrapper--menu-MENUNAME.tpl.php
Using menu-block-wrapper-MENUNAME.tpl.php does not seem to work in D7. Also, remember to also have menu-block-wrapper.tpl.php next to it, and to clear your Drupal cache. If you don't clear the cache (/admin/config/development/performance), D7 won't know to look for menu-block-wrapper--menu-MENUNAME.tpl.php
Comment #7
minorOffense CreditAttribution: minorOffense commentedTo continue with #6, the pattern falls as menu-block-wrapper--MENU_BLOCK_MACHINE_NAME if you define a custom menu in code.
Ex:
Means your template needs to be menu-block-wrapper--my-main.tpl.php (NOTthe value of "menu_name" in the definition array, the key of the array itself)