I'm busy building a navigation bar that includes the user menu and cart along with the wishlist but trying to figure out how one would add it in the xml mockup to include it using the getChildHtml function.
I'm still very new to magento so please bare with me.
XML file: page.xml
<block type="page/html_header" name="header" as="header">
<block type="core/text_list" name="top.menu" as="topMenu" translate="label">
Now as far as I can see I have to include the following somewhere or extend the block or something not really sure, please help me in the right direction or even point me to a developers guide that would cover this.
<block type="checkout/cart_sidebar" name="cart_sidebar" as="topcart" template="checkout/cart/sidebar.phtml"/>
Create a file local.xml in your theme folder app/design/frontend/your_package/your_theme/layout/ add the following lines and save the file.
<layout version="0.1.0"> <default> <reference name="top.menu"> <block type="checkout/cart_sidebar" name="cart_sidebar" as="topcart" template="checkout/cart/sidebar.phtml"/> </reference> </default></layout>
Don't forget to clear magento cache(System->Cache management) after applying the change.
In order to learn more about Magento blocks ,layouts ,templates there is an official magento guide check it here