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

Problem getting new getChildHtml to work
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3217
Joined:  2009-02-26
Minneapolis MN
 

I am having a problem getting a new control to show that I made. (Sorry, I have just come out of .net and into php)

This is what I did.

Created new block entry in my page.xml

<block type="core/text_list" name="left" as="left"/>
<block type="core/text_list" name="content" as="content"/>
NEW----> <block type="core/text_list" name="AltNav" as="AltNav" />
<block type="core/text_list" name="right" as="right"/>

Then I created a new reference in my catalog.xml

<reference name="alt.menu">
<block type="catalog/nav_alt" name="catalog.altnav" template="catalog/navigation/altnav.phtml" />
</reference>

I created a page called altnav.phtml, then added it to my 1column page

<div class="middle layout-1column” id="main">
<?php echo $this->getChildHtml('global_messages') ?>
<?php echo $this->getChildHtml('content') ?>
NEW ---> <?php echo $this->getChildHtml('AltNav') ?>
</div>

I do not know why my new page is not showing?

What am I doing wrong?

Thanks Brent
PS How do I get my code all fancy in colour?

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