
Some nice Drupal 6 theming links
14 juli, 2010 - 12:33
Dear peeps from the Drupal street,
it's been a while since my last blog, kinda busy with some awesome Drupal projects!
I thought: maybe you'd like some theming resources. Here at Lucius HQ we bundle online resources in a wiki, so we have nice overviews of all that is important.
Here is a part of our theming page:
VERY important: Security
- Writing secure code: http://drupal.org/writing-secure-code
Important documentation of Drupal coding
- Anatomy of Drupal 6 theme http://drupal.org/node/171194
- Drupal 6 theming documentation http://drupal.org/theme-guide/6
- Core tpl-files and vars (cheat sheet) http://drupal.org/node/190815
- HTML en CSS tools en techniques http://drupal.org/node/37156
- Drupal coding documentation: http://drupal.org/node/360052
- Securing your site http://drupal.org/security/secure-configuration
- Use the Theme developer module http://drupal.org/project/devel
Important theming files
- http://drupal.org/node/171205 .Info file
- http://drupal.org/node/171194 Template.php
- http://api.drupal.org/api/drupal/modules--system--page.tpl.php/6 Page.tpl.php
- http://api.drupal.org/api/drupal/modules--system--block.tpl.php/6 Block.tpl.php
- http://api.drupal.org/api/drupal/modules--node--node.tpl.php/6 Node.tpl.php
Optional files and vars
- Core templates (cheat sheet) http://drupal.org/node/190815
- Define your own vars in preprocessing http://drupal.org/node/223430
- Preprocess Vars per node type http://api.drupal.org/api/function/template_preprocess_node/6
- Advanced theme settings, like adding images in theme settings page http://drupal.org/node/177868 module for example: http://drupal.org/project/themesettingsapi
Blocks
- http://api.drupal.org/api/function/hook_block/6 hook_block to define own blocks in custom modules with custom .tpl files
- http://drupal.org/handbook/modules/block Working with blocks
- http://drupal.org/node/104319 Overriding structure blocks
Menu's
- See http://api.drupal.org/api/function/theme_links/6
- Use print theme("links", ....) in page.tpl.php
- See also api.drupal.org search for "menu"
- Example: http://api.drupal.org/api/function/theme_menu_tree/6
Drupal core and module core overriding / theming
- Unset CSS files from core or modules http://drupal.org/node/285562
- Remove or replace CSS & Javascript http://www.mediacurrent.com/blogs/remove-or-replace-jscss-page
- Deafult theme implementations http://api.drupal.org/api/group/themeable/6
- Complete resource for override-able theme output http://drupal.org/node/341628
- Theming core html and module core functions: search for "theme_" in the module directory. Then you'll find the function that can be overridden in template.php
- Check file "theme.inc" for Drupal core overridable output
- Override and Variable overview for core theme components node/page/block/comments/..: http://drupal.org/phptemplate
- Using a theme function instead of the .tpl.php. If you want, for example, search-theme-form.tpl.php to be rendered through a function. Simply declare this function in your template.php:
function MYTHEME_search_theme_form($form){}
Further online Drupal resources for theming
& http://drupal.org/node/108459
Feedback or Questions about theming in Drupal?
Off course there are a lot more resources, if you feel like it:
Please hit me on Twitter for all your feedback, and any other issue!