Getting not only the block data by ID but also its css
Permalink 1 user found helpful$block = Block::getByID($bID); $block->display($view = 'view', $args = array());
This gives me the data and the HTML of the block but it does not add the css or javascript that comes with the block.
How can I include e.g. the CSS as well?
Thx :-)

http://www.concrete5.org/developers/bugs/5-4-1-1/global-scrapbook-b...
Might check out the Global stacks/blocks options.
More Info:http://www.concrete5.org/community/forums/customizing_c5/global-sta...
$b = Block::getByID(156); $bvt = new BlockViewTemplate($b); $headers = $bvt->getTemplateHeaderItems(); if (count($headers) > 0) { foreach($headers as $h) { $this->addHeaderItem($h); } }
ps: what annoys me massively is that I cannot use $this->addHeaderItem() inside the view() method of a controller......d'oh.
Thanks!