Home ›
Theming tips for module developers session by John Albin Walker at DCSF2010Theming tips for module developers session by John Albin Walker at DCSF2010
Submitted by Benjamin Melançon on April 20, 2010 - 6:45am
Reuse a theme hook if you can!
links
image
image_style
item_list
username
file_link
html_tag
more_link
pager
progress_bar
table
See full list:
http://api.drupal.org/api/group/themeable/7
Advantages of re-using:
- Avoiding creating your own (addition to) hook_theme(), template or theme function, or template_preprocess_hook
just:theme('hook', $vars);
- Themers don't have to learn how to theme just your module.
- Instant integration with other modules. He re-used Drupal's core menu theming for menu block module. As a result, DHTML Menu workes with it great!
John just made sure all of Drupal (i started my own clap, i have to learn to start earlier and keep it going long enough, but some people joined, John thanked us)
Theme hook suggestions
Looks for theme_links__node before falling back to theme_links
Awesome!
This gets over the problem of overriding all theme_links or theme_item_list when you really want to do it for one spot.
Searched words:
john albin drupal theme hooks
Comments
Post new comment