Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

mail_open
Can't add Custom block to the footer.
Avatar
artur
Spain
Member
September 3, 2014 - 2:33 pm
Member Since: October 22, 2013
Forum Posts: 103

Hey guys,

Maybe you can help me, I’m stuck here…

The thing is that I’m adding responsive Foundation Grid to the template that I’m developing.

I’ve encountered the problem with the footer.

I want to use 5 columns in my footer, 3 of witch will be controled from the BO, so there is no problem there.

But other 2 I want to add from Magento, which are Subscribe and Account links.

So I want to add a Custom Block using Local.xml to the footer, and in that block include Account links and Subscribe button.

I’ve tryed this method in Local.xml:
1. Removed the default links and added block:

<reference name="footer">
<remove name="footer.newsletter"/>
<remove name="footer_links"/>
<remove name="footer_links2" />
<block tyle="core/text_list" name="customblock" as="customblock" translate="label">
<label>Custom Block</label>
</block>
</reference>

2. Created a reference for the block:

<reference name="customblock">
<block type="core/template" name="customblock" as="customblock" template="page/template/customblock.phtml">
<action method="setTitle"><title>Custom Block</title></action>
</block>
</reference>

3. Created the .phtml file for the custom block in page/template directory with this content:

<h1 style="background-color:yellow">Hello New Reference!</h1>

4. Went to the footer .phtml file and added

<div><?php echo $this->getChildHtml(‘customblock’) ?></div>

But this doesn’t work… I don’t know why.

What am I doing wrong?

P.S. In case you need footer.phtml content:

<?php echo $this->getChildHtml() ?>
<div class="clearfix"></div>
<address class="copyright"><?php echo $this->getCopyright() ?></address>
<div><?php echo $this->getChildHtml(‘customblock’) ?></div>

When this will work I want to wrap it in my responsive grid and add these two elements:
1. Account links:

<block type="page/template_links" name="footer_links2" as="footer_links2" template="page/template/links.phtml">
<action method="setTitle"><title>Account</title></action>
</block>

2. Subscribe form:

<block type="newsletter/subscribe" name="footer.newsletter" as="newsletter" before="footer_store_language" template="newsletter/subscribe.phtml"/>

Thanks,

Buuu... Are you scared? Shouldn't be.
eBay store and eCommerce design.

Avatar
artur
Spain
Member
September 3, 2014 - 3:14 pm
Member Since: October 22, 2013
Forum Posts: 103

I’ve added subscribe by adding this to the static block:

{{block type="newsletter/subscribe" name="footer.newsletter" as="newsletter" template="newsletter/subscribe.phtml"}}

But still can’t figure out how to add DYNAMIC account links. For example, if not registered display items for guest (such as Register, Sign In etc) and if Signed in, then my account options.

In php it’s like this:

<?php echo $this->__(‘Account’); ?>

But the above code can’t be added to static block… How do I solve this?

Thanks,

Buuu... Are you scared? Shouldn't be.
eBay store and eCommerce design.

 

Why Should You Join UnderstandingE?

 
  • Access to over 500 step-by-step video tutorials
  • +20 video courses available
  • Magento, M2E Pro, Magmi, eBay, Amazon & Design all covered
  • Everything is in 100% Plain English
  • Learn how to build your own multi-channel software for eBay & Amazon
  • Access to the community forums, meet fellow business owners like yourself

Join Now with 2 Clicks

 

Join now for less that £1 per day you can gain access to over 400 step-by-step video tutorials & learn how to build your very own multi-channel software.

 

Forum Timezone: Europe/London

Most Users Ever Online: 1012

Currently Online:
21 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Jim @ Moogento: 688

Steve Froggatt: 514

Badeth - UE: 513

Jimbob: 453

Paul Cartwright: 414

Forum Stats:

Groups: 6

Forums: 37

Topics: 5222

Posts: 27488

Administrators: Matthew Ogborne: 4565, Dave Furness: 4606