Slider Revolution magento extension FAQ

How to insert Slider Revolution programmatically

You can insert Slider Revolution to Magento store programmatically by adding it to layout or generating and outputting its code in controller action or block.

For example in controller action you can use following code:

$myBlock = $this->getLayout()

This will create Slider Revolution block, now you can render it to html string to output it somewhere:

$myHtml =  $myBlock->toHtml();

Or add it to layout:

//Now showing it with rendering of layout

To do it in your block class:

$myBlock = $this->getLayout()

And then add it to block’s children:

$this->setChild('revslider', $myBlock);



Leave a Reply

Your email address will not be published. Required fields are marked *