0

I am trying to show a inquiry form in a new static block, this is what I have done.

{{block type="core/template" template="app/design/frontend/default/default/template/imedia/productinquiry.phtml"}}

However it does not show anything. I am using Version magento 1.8.1

3
  • where did you put this code ? Jan 6, 2015 at 2:12
  • In csm -> static block, I created a new static block name inquiry.
    – Nobleman80
    Jan 6, 2015 at 2:26
  • hey did you resolve your issue ?? if yes, feel free to answer your own question and accept it. Or accept below answer if it helped you to resolve your issue Jan 21, 2015 at 5:46

1 Answer 1

1

Blocks use the template fallback system. You don't need the full path to your template file from root. You just need it from the within the template folder. Also, don't forget to include a block name for reference.

Try this instead:

{{block type="core/template" name="imedia.product.inquiry" template="imedia/productinquiry.phtml"}}
2
  • But are you sure block directive works inside static blocks?? As far as I know it is not possible. Am I wrong ? Jul 7, 2015 at 12:08
  • 1
    The template processor Mage_Cms_Model_Template_Filter renders these variables. Check out Mage_Cms_Block_Block::_toHtml() to see how it works. Jul 7, 2015 at 12:49

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.