Mark Fredrickson ha scritto:
The $sidebar_left and $sidebar_right variables are constructed by passing blocks to block.tpl.php and then concatenating those results.
Therefore, if you insert a delimiter (I use HTML comments: <!-- DELIMITER -->) into either node.tpl.php or block.tpl.php you can find it later and break up the $content, $sidebar_left, and $sidebar_right variables using
I have another solution:
block.tpl.php contain only: <?php global $module; $module[] = $block; ?>
and page.tpl.php contains: <?php global $module; ?>
No need to print $sidebar_*;
:)
In example print_r($module):
Array ( [0] => stdClass Object ( [module] => forum [delta] => 0 [status] => 1 [weight] => 0 [region] => 0 [custom] => 0 [throttle] => 0 [visibility] => 0 [pages] => [types] => [subject] => Active forum topics [content] => <div class="item-list"><ul><li><a href="?q=node/12">Primo topic</a></li></ul></div><div class="more-link"><a href="?q=forum" title="Read the latest forum topics.">more</a></div>
)
[1] => stdClass Object ( [module] => forum [delta] => 1 [status] => 1 [weight] => 0 [region] => 0 [custom] => 0 [throttle] => 0 [visibility] => 0 [pages] => [types] => [subject] => New forum topics [content] => <div class="item-list"><ul><li><a href="?q=node/12">Primo topic</a></li></ul></div><div class="more-link"><a href="?q=forum" title="Read the latest forum topics.">more</a></div> )
[2] => stdClass Object ( [module] => user [delta] => 1 [status] => 1 [weight] => 0 [region] => 0 [custom] => 0 [throttle] => 0 [visibility] => 0 [pages] => [types] => [subject] => pupabz [content] => <div class="menu"> <ul> <li class="collapsed"><a href="?q=node/add">create content</a></li> <li class="leaf"><a href="?q=user/2">my account</a></li> <li class="collapsed"><a href="?q=admin">administer</a></li> <li class="leaf"><a href="?q=logout">log out</a></li>
</ul> </div> )
)
Bye. Michel.