Hello,
I try to move the album carousel to a specific position into my theme, so I created a album_carousel_block.php class :
class album_carousel_block_Core {
static function get_site_list() {
return array("album_carousel" => t("Album carousel"));
}
static function get($block_id, $theme) {
$block = "";
switch ($block_id) {
case "album_carousel":
$block->css_id = "g-album_carousel";
$block->title = t("Album Carousel");
$block = new Block();
$block->content = new View("album_carousel.html");
}
return $block;
}
}
And then call it inside the theme with this :
album_carousel_block::get("album_carousel", $theme)
It just returns me a blank line. I verified that the function was called, code seems correct to me but it doesn't seems to work.
Any advice ?
Thank you very much
Posts: 37
Very curious to hear a response on this, wanting to add a block from another module in the album page.
Posts: 27300
Adding:
<?= album_carousel_block::get("album_carousel", $theme); ?>
works for me.Note the = or you could use echo if so inclined.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team