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

Navigation menu (breadcrumbs) problem
 
joshressler
Jr. Member
 
Total Posts:  3
Joined:  2012-07-27
 

Hi first time post here.  Seasoned web designer dipping my hand into the wonderful world of Magento.

I’ve got Packt Publishing\\\’s Magento 1.4 cookbook here, trying to follow along making my own theme.

I\\\’ve customized the homepage to make it look as I want.  Using a template called 2columns-right.phtml and page.xml everything is working fine so far apart from the navigation.  For the life of me, I can\\\’t get it to show.

page.xml called the block

<block type=\\\"page/html_breadcrumbs\\\" name=\\\"breadcrumbs\\\" as=\\\"breadcrumbs\\\"/>

and 2columns-right.phtml echos the PHP code

<?php echo $this->getChildHtml(\\\'breadcrumbs\\\'?>

I know that the categories are all active and working because if I put the default theme the navigation shows.

If it\\\’s not any of these things I\\\’ve suggested.  What else could it be?

Full code

page.xml

<?xml version=\\\"1.0\\\"?>
<layout version=\\\"0.1.0\\\">
<!--
Default 
layoutloads most of the pages
-->

    <default 
translate=\\\"label\\\" module=\\\"page\\\">
        <
label>All Pages</label>
        <
block type=\\\"page/html\\\" name=\\\"root\\\" output=\\\"toHtml\\\" template=\\\"page/2columns-right.phtml\\\">
        
            <
block type=\\\"page/html_head\\\" name=\\\"head\\\" as=\\\"head\\\">
                
                <
action method=\\\"addCss\\\"><stylesheet>css/text.css</stylesheet></action>
                <
action method=\\\"addCss\\\"><stylesheet>css/960_24_col.css</stylesheet></action>
                <
action method=\\\"addCss\\\"><stylesheet>css/style.css</stylesheet></action>
                <
action method=\\\"addJs\\\"><script>test.js</script></action>
                <
action method=\\\"addCss\\\"><stylesheet>css/menu/core.css</stylesheet></action>
                <
action method=\\\"addCss\\\"><stylesheet>css/menu/styles/sgray.css</stylesheet></action>
                <
action method=\\\"addCss\\\"><stylesheet>css/fwslider.css</stylesheet></action>
                 
                <!--
[if (gt IE 9)|!(IE)]><!-->
                    <
action method=\\\"addCss\\\"><stylesheet>css/menu/effects/fade.css</stylesheet></action>
                <!--<!
[endif]-->
                
                <!--
[if IE]>
                    <
link rel=\\\"stylesheet\\\" href=\\\"css/menu/styles/ie.css\\\" type=\\\"text/css\\\" />
                <!
[endif]-->

                <!-- 
This piece of codemakes the CSS3 effects available for IE -->
                <!--
[if lte IE 9]>
                    <
script src=\\\"js/jquery-1.7.1.min.js\\\" type=\\\"text/javascript\\\" charset=\\\"utf-8\\\"></script>
                    
<script src=\\\"js/menu.min.js\\\" type=\\\"text/javascript\\\" charset=\\\"utf-8\\\"></script>
                    
<script type=\\\"text/javascript\\\" charset=\\\"utf-8\\\">
                        $(function() 
{
                            
$(\\\"#menu\\\").menu({\\\'effect\\\' \\\'fade\\\'});
                        
});
                    
</script>
                
<![endif]-->                 
                 
                <
action method=\\\"addJs\\\"><script>fwslider.js</script></action>
                <
action method=\\\"addJs\\\"><script>js/css3-mediaqueries.js</script></action>

                <
script type=\\\"text/javascript\\\">
                    $(
window).load(function(){
                        
new fwslider().init({
                            duration
\\\"1000\\\"/* Fade Speed (miliseconds) */
                            
pause:    \\\"6000\\\"  /* Autoslide pause between slides (miliseconds)*/
                        
});
                    
});
                
</script>
                 
            
</block>
            
            <
block type=\\\"page/html_breadcrumbs\\\" name=\\\"breadcrumbs\\\" as=\\\"breadcrumbs\\\"/>
            <
block type=\\\"core/text_list\\\" name=\\\"content\\\"    as=\\\"content\\\" translate=\\\"label\\\">
                <
label>Main Content Area</label>
            </
block>

        </
block>

        <
block type=\\\"core/profiler\\\" output=\\\"toHtml\\\" name=\\\"core_profiler\\\"/>
    </default>

</
layout>
 
Magento Community Magento Community
Magento Community
Magento Community
 
joshressler
Jr. Member
 
Total Posts:  3
Joined:  2012-07-27
 

I didn’t actually mean breadcrumbs, I meant the topMenu.  After doing some research the problem seems to be that the book was written for Magento 1.4 and I’m using Magento 1.7.  The navigation seems to of changed a bit in the system upgrades.  I haven’t found an actual solution yet so if anyone knows it would be greatly appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
pbirnie
Jr. Member
 
Avatar
Total Posts:  12
Joined:  2012-05-10
 

Josh,

Looks like you are missing the reference to the top.menu altogether in your page.xml file.  You should have something like this:

<block type=\"page/html_header\" name=\"header\" as=\"header\">
                <
block type=\"page/template_links\" name=\"top.links\" as=\"topLinks\"/>
                <
block type=\"core/text_list\" name=\"top.menu\" as=\"topMenu\" translate=\"label\">
                    <
label>Navigation Bar</label>
                    <
block type=\"page/html_topmenu\" name=\"catalog.topnav\" template=\"page/html/topmenu.phtml\" />
                </
block>
 
                <
block type=\"page/html_wrapper\" name=\"top.container\" as=\"topContainer\" translate=\"label\">
                    <
label>Page Header</label>
                    <
action method=\"setElementClass\"><value>top-container</value></action>
                </
block>
            </
block>

            <
block type=\"page/html_breadcrumbs\" name=\"breadcrumbs\" as=\"breadcrumbs\"/>

This was more or less pulled from the default theme…

 
Magento Community Magento Community
Magento Community
Magento Community
 
joshressler
Jr. Member
 
Total Posts:  3
Joined:  2012-07-27
 

Thanks for the reply, I actually found a very similar problem here the problem with searching for it is that so many people are asking how they can move their navigation that it was like trying to search for a needle in a haystack but your reply is exactly the same as the other guys.

I tried to look in the default theme but couldn\\\’t find page.xml in it. Where do you find page.xml in the default theme?  When you go to C:\\\\wamp\\\\www\\\\jewellery\\\\app\\\\design\\\\frontend\\\\default you only have the option of etc and locale.

Anyway after staying up till 4am (UK time) it finally works. Now the joys of waking up and styling the navigation.

Thanks for the help

 
Magento Community Magento Community
Magento Community
Magento Community
 
pbirnie
Jr. Member
 
Avatar
Total Posts:  12
Joined:  2012-05-10
 

Hey Josh,

You should have frontend/base/default/layout in your app/design folder.  Just copy page.xml from there to your theme and it will give you a good boilerplate.

- Phil

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