I am quite new to Magento, and I'm trying to echo the built in contact form in the footer of a custom Magento-theme. It can't get it working, this is my code:
Path to form.phtml: (app/design/frontend/default/mytheme/template/contacts/form.phtml)
XML (app/design/frontend/default/mytheme/layout/page.xml:
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml">
<block type="page/html_wrapper" name="bottom.container" as="bottomContainer" translate="label">
<label>Page Footer</label>
<action method="setElementClass">
<value>bottom-container</value>
</action>
</block>
<block type="page/template_links" name="footer_links" as="footer_links" template="page/template/links.phtml"/>
<block type="page/template_links" name="top.links" as="topLinks"/>
<block type="contacts/form" name="form" as="form" template="contacts/form.phtml"/>
//the contact form
<block type="newsletter/subscribe" name="newsletter" template="newsletter/subscribe.phtml"/>
<block type="cms/block" name="cms_footer_contact">
<action method="setBlockId">
<block_id>contact_info</block_id>
</action>
</block>
</block>
php (app/design/frontend/default/mytheme/template/page/html/footer.phtml):
<div class="footer">
<div class="col3-set">
<div class="col-1">
<div class="footer-links">
<?php echo $this->getChildHtml('cms_footer_links') ?>
<?php echo $this->getChildHtml('footer_links') ?>
</div>
</div>
<div class="col-2">
<h2 class="<footer-title"><?php echo $this->__('Ask us') ?></h2>
<?php echo $this->getChildHtml('contact-form') ?>
<?php echo $this->getChildHtml('form') ?> //echoing the form
</div>
<div class="col-3">
<h2 class="footer-title"><?php echo $this->__('Contact Details') ?></h2>
<div class="footer-contacts">
<?php
if(Mage::getStoreConfig("trego_settings/footer/newsletter", $code)){
echo $this->getChildHtml('newsletter');
}
?>
<div class="contact-info">
<?php echo $this->getChildHtml('cms_footer_contact') ?>
</div>
</div>
</div>
</div>
<div class="footer-menu">
<?php echo $this->getChildHtml('topLinks') ?>
<?php echo $this->getChildHtml('footer_socialIcons'); ?>
<?php echo $this->getChildHtml('footer_copyrights'); ?>
</div>
</div>