By Clément on
Hello,
I wish display in a shop that works with Magento the regions of the site in the layout.
I created a node for the shop and now I want show this regions on my Magento's shop.
Is it possible to retrieve the regions (sidebar_left, sidebar_top, footer, ...)?
I have tried many things but without succes... :(
A exemple:
<?php
define('DRUPAL_ROOT', dirname(__FILE__).'/carmelocrea/');
define('DRUPAL_BOOTSTRAP_PATH', 'node/12');
require_once 'carmelocrea/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
print print_block('nav');
function print_block($region = 'sidebar_first') {
$output = '';
$block_list = block_list($region);
//print '<pre>'.print_r($block_list, true).'</pre>';
foreach($block_list as $block) {
print_r($block).print '<hr/>';
$renderable_block .= _block_get_renderable_array($block);
$output = drupal_render($renderable_block);
break;
}
return $output;
}
Can you help me please? Thank you very much!
Comments
My problem is now solved
Finally, I created a small function to show the blocks of a specific region based on the page seen. I hope it will help some who are in the same situation as me. ;-)
My problem is now solved.