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

Call echo $this->getChildHtml(’topSearch’) from outside header
 
ActusMedia
Member
 
Avatar
Total Posts:  46
Joined:  2007-11-01
Netherlands, Enschede
 

Dear Community,

What would be the best approach if one needs to call the getChildHTML from outside the orginal template it was in,
I need this option since im building a HEAVILY customized (not seen before) webshop for one of my customers.

To buzzy with the CSS coding currently to digg into the code again, if someone knows a solution for this please let me know

@Varien:
Woudent it be more easy to allow globally calls with echo $this->getChildHtml without (I assume) first define on forehand?

Thanks in advanche!

 
Magento Community Magento Community
Magento Community
Magento Community
 
crius
Guru
 
Avatar
Total Posts:  623
Joined:  2007-10-16
Denmark
 

If you are building a heavily customized shop, you should probably learn how templates and layouts work (Designer’s Guide).

The layouts define the block structure, including which children the blocks have. getChildHtml will render the html for a child defined in the layout.

To move the topSearch block, edit catalogsearch.xml. This file puts the topSearch in the header, and you can change it to put it somewhere else.

See http://www.magentocommerce.com/boards/viewthread/10169/

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