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

extra column in footer to call cms static block
 
kunoichidee
Member
 
Total Posts:  35
Joined:  2011-11-28
 

Hi,

can someone help me with this, I’m really not experienced in the phtml coding etc in magento, and from browsing around it looks pretty complex to find out how its structured, so, I hope someone can help me out here.... smile

I have in my template a footer with 3 columns but I want a 4th as there is clearly room for it.
I have made an extra new static block already that should be in there, but with the footer.phtml I cant get it to appear.
here’s the code now:

<div class="footer-container">
  <
div class="footer">
    
    <
div class="extra_wrap">
      <
div class="footer_col_1">
        
<?php echo $this->getChildHtml('cms_footer_links'?>
        <?php 
echo $this->getChildHtml('footer_list'?> 
      
      
</div>
      <
div class="footer_col_2">
        
<?php echo $this->getChildHtml('footer_links'?></div>
      
<
div class="footer_col_1">        
   
<?php echo $this->getChildHtml('footer_list_2'?> </div>

    </
div>
      <
div class="extra_wrap"
      
<
div class="footer-top">       <address>
<?php echo $this->getCopyright() ?> 
    
    
</address>  
        
<?php echo $this->getChildHtml('store_switcher'?>
        <?php $current_page 
Mage::app()->getFrontController()->getRequest()->getRouteName(); 
            if (
$current_page == 'cms'):
                echo 
'<em></em>';
            endif;
        
?></div>
    </
div>  
  </
div>
</
div>

what code should I add to call for the other staticblock?
or should I also add some code somewhere else...? in another file?

side question:
I also would like to have the title of the 2nd block not in the footer file but somewhere where the translation can catch it. like the other ones, I deleted the title from the footer file code and added the title to the static blocks themselves, now translation can catch them too. But for the 2nd block its different, as those links are not from a static block…

Image Attachments
Schermafbeelding 2012-01-20 om 02.11.33.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
Sam @ RocketTheme
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2011-01-28
RocketTheme
 

To call a cms block from a template file, use the following:

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('blockidentifier')->toHtml(); ?>

replacing “blockidentifier” with the ID of your cms block.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sam @ RocketTheme
Jr. Member
 
Avatar
Total Posts:  15
Joined:  2011-01-28
RocketTheme
 

To make text translatable it needs to be added in the following format:

<?php echo $this->__('Whatever Here') ?>

Then you can add it to your translate.csv file, with a translation, like so:

“Whatever Here","Translation Here”

 
Magento Community Magento Community
Magento Community
Magento Community
 
kunoichidee
Member
 
Total Posts:  35
Joined:  2011-11-28
 

Hi there

oh I missed your answer, I just found it smile
I just wanted to say thanks, it worked great, exactly like I wanted it.

Greetings

Diana

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