I`ve created some regions for plocks (phptemplate). For example: region1, region2
And i created templates: block-region1.tpl.php and block-region2.tpl.php
These filies are equal.
So here is a question: how can I creat only 1 template file for 2 different regions?

Comments

BladeRider’s picture

Simplest way I can think of is to use PHP's include function, something like this:

block-region1.tpl.php

/**
 * This file is block-region1.tpl.php
 *
 * All of your block code, HTML, etc here as normal
*/

...and then:

block-region2.tpl.php

include('block-region1.tpl.php');

Not the most elegant way, but quick and dirty without messing about with the more devious tricks of the PHPTemplate engine.