Theming tips for module developers session by John Albin Walker at DCSF2010
Reuse a theme hook if you can!
See full list:
Advantages of re-using:
- Avoiding creating your own (addition to) hook_theme(), template or theme function, or template_preprocess_hook
- 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
This gets over the problem of overriding all theme_links or theme_item_list when you really want to do it for one spot.