0

I have plugin who method show text. I would like call the function from my block in cms static block. How to do this? Any hints?

1
  • 1
    provide some code and example what you are trying Commented Jan 2, 2017 at 9:12

2 Answers 2

0

You have to call any block file from static block like :

{{block type="core/template" template="custom/custom.phtml"}}

and in this file you can call that plugin method and echo that value.

0

First of all, try to display your block in phtml to test if your block works fine like this:

<?php echo Mage::app()->getLayout()->createBlock('core/template')->setTemplate('yourfolder/yourfile.phtml')->toHtml(); ?>

If your Block work correctly you should call it in your cmc page like this

{{block type="core/template" name="your.block.name" template="yourfolder/yourfile.phtml"}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.