Magento Forum

   
Some basic programming questions
 
tuna
Jr. Member
 
Total Posts:  7
Joined:  2008-06-09
 

Excuse my ignorance, but i’v printed off and read the design guide a couple of times now, and am still struggling to get my head around design/programming with magento. Having dealt with osCommerce for the past couple of years this is probably why. My question is, i am editing the homepage via the CMS, and am trying to embed a box with a list of the stores categories in it, in the left column of a 3 column layout.

My solution was to turn template path hints on, find the location of the category section and then insert this code directly into the xhtml. I was clearly wrong as when i tried to insert the phtml it simply didn’t work. How do i go about doing this?

Thanks

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

Just to be clear, do you want to move the top menu with categories to the left column?

 
Magento Community Magento Community
Magento Community
Magento Community
 
tuna
Jr. Member
 
Total Posts:  7
Joined:  2008-06-09
 

If possible i’d like to keep the top menu, and also have the menu in the left column, thanks

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

Take a look at the following code in app/design/frontend/default/default/layout/catalog.xml:

<default>

        <!-- 
Mage_Catalog -->
        <
reference name="top.menu">
            <
block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/>
        </
reference>
        <
reference name="left">
            <
block type="core/template" name="left.permanent.callout" template="callouts/left_col.phtml">
                <
action method="setImgSrc"><src>images/media/col_left_callout.jpg</src></action>
                <
action method="setImgAlt" translate="alt" module="catalog"><alt>Our customer service is available 24/7. Call us at (800DEMO-NUMBER.</alt></action>
                <
action method="setLinkUrl"><url>checkout/cart</url></action>
            </
block>
        </
reference>

See the catalog/navigation block? Just copy that to the left reference.

And keep on reading that design guide. It explains how those xml files work.

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