Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Create a New Block Underneath The Footer To Hold Content - Currently Not Showing Content, Please Help. 
 
timmle
Member
 
Total Posts:  72
Joined:  2009-10-07
 

This is really racking my brain. I want to place a new section underneath the footer so i can insert images and text and so fourth and assign a new css style to it. I do not want it to be part of the footer though.

So i created in the page.xml file a new block like this;

<block type="page/html_infofooter" name="infofooter" as="infofooter" template="page/html/infofooter"/>

underneath the footer area.

I then went and created a new block php (InfoFooter.php) file to put in Core/Code/Mage/Blocks/Html with the following content;

<?php

class Mage_Page_Block_Html_InfoFooter extends Mage_Core_Block_Template
{
    
function __construct()
    
{
        parent
::__construct();
        
$this->setTemplate('page/html/infofooter.phtml');
    
}

}

?>

I then created a new phtml file to put in page/html where the content will be. I just wrote some text in this file for instance.

I then finally went to the 1 column layout page (my home page layout) and underneath the footer section inputted;

<div class="infofooter" id="infofooter">
        
<?php echo $this->getChildHtml('infofooter'?>
        
</div>

I then went into boxes.css and assigned a 100px height, 960px width, white background and black text so i could see my text inputted.

The box is showing with the correct css style, but the content of the page is not showing, the text i placed in the infofooter.phtml file.

Why is it not showing? Does Anybody Know?

Thankyou.

 
Magento Community Magento Community
Magento Community
Magento Community
 
xinhaozheng
Sr. Member
 
Total Posts:  107
Joined:  2009-03-09
 

looks like you block didnt call the template file corectly maybe some path prob.

anyway,for you,here is a more ligtht solution:
you can make use of core/template block come with magento:

<block type="core/template" name="optional_zip_countries" as="optional_zip_countries" template="directory/js/optional_zip_countries.phtml" />

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top