Is someone willing to give this some love and write a doc page at How To Do Theming Examples Made Simple in Drupal 7
See these forum topics for background:
Displaying my custom menu?
How to print a menu in Drupal 7?
If I'll figure it out I'll post it in the documentation, but I've spend 5 hours on this already, unfortunately there is a limit on how much time I can spend on this, and can't seem to figure it out.
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