Customise block.tpl.php

The default block.tpl.php resides at:

  modules/system/block.tpl.php

This can be copied and placed within the 'theme' directory. Afterwhich, this version will be used.

Customise block.tpl.php by block

To make specific to a particular block simply include the 'blockname' as follows: block-blockname.tpl.php.

e.g. block-views-news-block_1.tpl.php

Customise block.tpl.php by Region

To make specific to a region where the block is located simply include the 'region' as follows: block-region.tpl.php.

Create variable for use within page.tpl.php

Within the template.php file add something like below:

function phptemplate_preprocess_page(&$vars) {
  $vars['random_descriptor'] = rand(1,2);
  $vars['sample_variable'] = t('Lorem ipsum.');
  $vars['random_key_message'] = rand(1,3);
  $vars['faq_terms'] = theme('links', $variables['taxonomy'], array('class' => 'links inline'));
  // To remove a class from $classes_array, use array_diff().
  //$vars['classes_array'] = array_diff($vars['classes_array'], array('class-to-remove'));
}

Then within the page.tpl.php add something like below:

Web Design

With over 25 years of experience, Zerotouch has been designing and developing custom websites for a diverse range of clients across various industries. Our proven track record showcases our ability to create high-impact websites that drive measurable results and deliver a strong return on investment.

Our focus is not only on building exceptional websites but also on providing ongoing support to ensure your site continues to perform and evolve with your business. We offer comprehensive post-launch services, including: