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

Top Menu Not Displaying/Loading [SOLVED]
 
capnhud
Member
 
Total Posts:  37
Joined:  2010-07-15
 

For some reason the top navigation menu will not display in the catalog.xml is the following for catalog.topnav

<reference name="header">
            <
block type="catalog/navigation" name="catalog.topnav" as="topnav" template="catalog/navigation/top.phtml"/>
        </
reference>

and in the top.phtml is the following:

<?php 
/**
 * Top menu for store
 *
 * @see Mage_Catalog_Block_Navigation
 */
?>
<?php 
//if(count($this->getStoreCategories())>1): ?>
<div class="mw_navigation">
    <
ul id="nav">
    
<?php $first=0;?>
    <?php 
foreach ($this->getStoreCategories() as $_category): ?>
        
        
<li class="<?php if($this->isCategoryActive($_category)){echo 'active';} if($first==0): echo ' first'; endif;?> " onmouseover="toggleMenu(this,1)" onmouseout="toggleMenu(this,0)">
            <
class="<?php if($first==0): echo ' first'; endif;?>" href="<?php echo $this->getCategoryUrl($_category)?>">
                <
span><?php echo $_category->getName()?></span>
            </
a>
            
<?php if (Mage::helper('catalog/category_flat')->isEnabled()) {
                $_sub_categories 
$_category->getChildrenNodes(); 
            
else {
                $_sub_categories 
$_category->getChildren(); 
            
}?>
            
<ul>
            
<?php foreach ($_sub_categories as $_sub_category):?>
                 <?php 
echo $this->drawItem($_sub_category?>
             <?php 
endforeach ?>
            
</ul>
        </
li>
        
<?php $first++;?>
       
    <?php 
endforeach ?>
    
</ul>
</
div>    
<?php //endif; ?>

however I do not see what would cause the top navigation to not display at all.

 
Magento Community Magento Community
Magento Community
Magento Community
 
capnhud
Member
 
Total Posts:  37
Joined:  2010-07-15
 

thinking that the problem may be in this part of the catalog.xml

<reference name="header">
            <
block type="catalog/navigation" name="catalog.topnav" as="topnav" template="catalog/navigation/top.phtml"/>
        </
reference>

I changed it to

<reference name="top.menu">
            <
block type="catalog/navigation" name="catalog.topnav" as="topnav" template="catalog/navigation/top.phtml"/>
        </
reference>

but still the top.phtml is still not loading

 
Magento Community Magento Community
Magento Community
Magento Community
 
capnhud
Member
 
Total Posts:  37
Joined:  2010-07-15
 

This is resolved, there was a module that interfered with the navigation

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