I have a CMS page with a URL key of "contact" (without the last 's'), I would like to add a block within it. The content of the CMS page is simply:
{{block type="core/template" name="contactForm" form_action="/contacts/index/post"template="contacts/form.phtml"}}
I know, why don't they just use Magento's default /contacts form. That's the way they have it set up but I will talk to them about changing it as it would make things easier.
Anyway the problem is I want to add a block to contactForm
, I've tried with below Layout XML in a local.xml
and in the CMS Page Layout Update XML section, but it doesn't work.
local.xml
<contacts_index_index>
<reference name="contactForm">
<block type="studioforty9_recaptcha/explicit" name="studioforty9.recaptcha.explicit" template="studioforty9/recaptcha/explicit.phtml"/>
</reference>
</contacts_index_index>
CMS Page Layout Update XML
<reference name="contactForm">
<block type="studioforty9_recaptcha/explicit" name="studioforty9.recaptcha.explicit" template="studioforty9/recaptcha/explicit.phtml"/>
</reference>
I'm not sure why it's not working, I also tried adding the studioforty9_recaptcha/explicit
block to System > Permissions > Blocks, but that didn't work either.
I can see it is working with the /contacts form so am going to encourage them to just use this one, but am interested as to why my layout updates are not working.
I'm working on an old version of Magento, 1.7, I wonder if this may have something to do with it.
{{block type="core/template" name="contactForm" form_action="/contacts/index/post"template="contacts/form.phtml"}}
should be{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}