Putting regions and blocks in Drupal nodes
Regions in blocks from Lullabot as interpreted by Morton:
übermucho more fun with regions in nodes
Ohh and another little thing i found over at the lullebot site (eaton you are a hero!) adding regions inside the node - damn that have been a lifesaver the last couple of weeks.
So just if i ever ever ever forgets it - heres the snip (and now no more absurd css trix margin: -666px 0 0 0)
add a regionfunction foo_regions() {
return array(
'foo_region' => t('foo region'),
'bar_region => t('bar region'),
);
}in the _phptemplate_variables() put this little baby:
//BLOGS -> NODE
// the region:
if ($vars['page'] == TRUE) {
$vars['foo_region'] = theme('blocks', 'foo_region');
$vars['bar_region'] = theme('blocks', 'bar_region');
}And now by sweet magick $foo_region & $bar_region is available for the node.tpl.php
and we are at it with the theming tricks:
Kick the $styles and add the needed one by hand -thats the only way to avoid the "where did that 1.5em padding came from"
Comments
Post new comment