/ Published in: PHP

Copy the first code snippet to your theme's template.php.
Then call the following section in you block template file.
Then call the following section in you block template file.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/*The function*/ <?php function block_id(&$block) { $info = module_invoke($block->module, 'block', 'list'); if ($info[$block->delta]['info']) { $block_id = 'block-' . $block->module . '-' . $info[$block->delta]['info']; } else { return 'block-' . $block->module . '-' . $block->delta; } } ?> /*Call this in your block.tpl.php file*/ <?php print block_id($block); ?>
Comments
