You are here

README.txt in Block Theme 5

Same filename and directory in other branches
  1. 8 README.txt
  2. 6 README.txt
  3. 7 README.txt
== Description ==
BlockTheme allows an admin to define tpl files for standard block templates
and provides a select box on the block configure form so the user can select
a tpl file to use as opposed to having to override the templates by block ID.

== Installation ==

1. Enable the module

2. go to admin/settings/blocktheme and add entries like:
customblocktemplate|My Custom Template
superblock|My SuperTemplate

3. Create tpl files in your theme directory like:
 customblocktemplate.tpl.php
 superblock.tpl.php
 
4. add the following to [yourtheme]_block($block) in template.php:

if (module_exists('blocktheme')) {
  if ( $custom_theme = blocktheme_get_theme($block) ) {
    return _phptemplate_callback($custom_theme,array('block' => $block));
  }
}

return phptemplate_block($block);

== Usage ==

Go to the configure screen for any block and select the appropriate template.

File

README.txt
View source
  1. == Description ==
  2. BlockTheme allows an admin to define tpl files for standard block templates
  3. and provides a select box on the block configure form so the user can select
  4. a tpl file to use as opposed to having to override the templates by block ID.
  5. == Installation ==
  6. 1. Enable the module
  7. 2. go to admin/settings/blocktheme and add entries like:
  8. customblocktemplate|My Custom Template
  9. superblock|My SuperTemplate
  10. 3. Create tpl files in your theme directory like:
  11. customblocktemplate.tpl.php
  12. superblock.tpl.php
  13. 4. add the following to [yourtheme]_block($block) in template.php:
  14. if (module_exists('blocktheme')) {
  15. if ( $custom_theme = blocktheme_get_theme($block) ) {
  16. return _phptemplate_callback($custom_theme,array('block' => $block));
  17. }
  18. }
  19. return phptemplate_block($block);
  20. == Usage ==
  21. Go to the configure screen for any block and select the appropriate template.