[development] finding blocks and getting them simpler.

Dries Buytaert dries.buytaert at gmail.com
Tue May 16 08:09:41 UTC 2006

On 15 May 2006, at 17:39, Earl Miles wrote:
>> Like Ber and Merlin, I find myself using the delta too. In  
>> template.php, I find
>> myself doing this:
>> function phptemplate_get_block($block_id) {
>>  $block = block_block('view', $block_id);
>>  return $block['content'];
>> }
>> Then in node/page.tpl.php I do:
>> <?php print phptemplate_get_block(6); ?>
>> Not pretty, and has hard coded block deltas, but it works.
> I actually like this. As I get more into developing for Drupal on a  
> professional level and less on a hobbyist level, I've come to  
> realize that on this level, database dependencies for functionality  
> can be bad. You can't easily but the database in version control;  
> but you can put your template.php in version control. The fewer db  
> dependencies you have, the easier it is to set up test sites for  
> various purposes.

We could change numeric IDs by labels?

Dries Buytaert  ::  http://www.buytaert.net/

More information about the development mailing list