Closed (fixed)
Project:
Drupal core
Version:
7.9
Component:
theme system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
14 Oct 2012 at 08:46 UTC
Updated:
18 Mar 2018 at 21:45 UTC
Jump to comment: Most recent
Comments
Comment #0.0
Anonymous (not verified) commentedText revision
Comment #1
Anonymous (not verified) commentedComment #1.0
Anonymous (not verified) commentedText revision
Comment #1.1
Anonymous (not verified) commentedText revision
Comment #1.2
Anonymous (not verified) commentedText revision
Comment #2
Anonymous (not verified) commentedFurther research on this subject has led to some answers, however some things remain left to solve.
The following code gives an expected result. It also does not result in error messages during testing. However in totality needs peer review.
In template.php:
See:
http://drupal.stackexchange.com/questions/7274/how-to-theme-a-menu-block
Please note: It is unknown whether the 'THEMENAME' is case sensitive. I used normal letters (not capitalized), and it worked fine. It may be good to note that my theme name is a single word. It is unknown at this time if the words a theme name with multiple words need to be seperated by an underscore(_) or a dash(-).
Then in page.tpl.php where you want the menu to show:
This would be in line with Drupal practice for Drupal 7 as far as I can determine at this time.
To Do
1. How to add the title of a menu?
Doing a
var_dumpgives an insight on to where the value is stored, but I haven't been able to find any info on how to add this in the template.php:2. Performance/ caching pros and cons versus other options such as using a block to show a menu in a template file.
3. Make a user friendly write-up that even nanna could understand, and add this to doc page.
Comment #3
Anonymous (not verified) commentedFor those interested there is a group discussion with suggestions and tips as well here.
Comment #4
dddave commentedComment #4.0
dddave commentedText revision