Is it possible to call a helper method to output a variable in a cms template?

Similar in fashion to the way helpers can be called in layout files such as:

<node helper="myhelper/myhelpermethod" />

Maybe there is some way to do like:

{{module method="params"}}

which is similar to

{{store direct_url="about-magento-demo-store"}}

2 Answers 2

  1. Create a template (.phtml ) file and call your helper function there.


  2. Then inside the CMS page call the template file

    {{block type="core/template" template="path/to/file/mytemplate.phtml"}}


You can create template where you can call helper. And then insert a block with this template.

{{block type="core/template" template="page/variable.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.