How to insert the Slider Revolution Magento Extension block into phtml files?

Asked

Viewed 182 times

1

I’m making some unproductive attempts to insert the block created by the extension for Magento inside the files phtml theme and already tried to insert as a block of the Slider Revolution and also put the shortcode plugin inside a native Magento block to try calling html by inserting the block into the theme file. I have type errors the variable $this is calling an object that does not exist.

inserir a descrição da imagem aqui

I can’t edit the files xml theme, so I didn’t even try to do that. The code I’m trying to insert inside the phtml is this:

echo $this->getLayout()->createBlock('nwdrevslider/revslider')->setAlias('fashion_slider')->toHtml();

Error

Fatal error: Using $this when not in Object context in ...

Can someone help me find a solution or follow a reasoning to make it work?

  • Marcos, have you ever tried to insert this Shortcode inside a CMS page, to see if it is working, before anything else? When you inserted inside the Native Block, which error generated? Abs

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.