Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

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