1

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"}}
1
  1. Create a template (.phtml ) file and call your helper function there.

    Mage::helper('myhelper')->myHelperMethod();

  2. Then inside the CMS page call the template file

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

0

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, privacy policy and cookie policy

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