Magento Forum

Changing layout when block is loaded from CMS page/block
 
Syndia
Member
 
Total Posts:  38
Joined:  2008-04-01
Netherlands, The
 

Is it really impossible to change layout, if block is loaded from CMS page or block?

I have added a block in my CMS page:

{{block type="rinso/demos" name="rinso_widget_demos" as="demos"}}

It loads the class Rinso_Module_Block_Demos

In the method _prepareLayout I have added the code to add a CSS file:

$this->getLayout()->getBlock('head')->addCss('css/module/mycss.css');

But it will not add it to the Head block, is there any way to do this with programming?

Thanks,
John

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top