Posted By

phpdiva on 05/19/10


Tagged

drupal drupal6


Versions (?)

Drupal 6 :: Embed block anywhere


 / Published in: PHP
 

Embed Drupal 6 block anywhere with proper block HTML IDs and classes.

  1. $module = 'anymodulename';
  2. $delta = 'blockdelta';
  3.  
  4. $block = (object) module_invoke($module, 'block', 'view', $delta);
  5. $block->module = $module;
  6. $block->delta = $delta;
  7.  
  8. print theme('block', $block);

Report this snippet  

You need to login to post a comment.