magento - How to display categories menu to other block? -
i using magento 1.7 , want change position of categories menu other place. categories displayed in header want them in content.
so code in header displaying categories:
<?php $_menu = $this->rendercategoriesmenuhtml(0, 'level-top', 'sub-wrapper' ) ?> <?php if($_menu): ?> <nav class="queldorei"> <ul id="queldoreinav"> <?php if (mage::getstoreconfig('shoppersettings/navigation/home')): ?> <li class="level0 level-top"> <a href="<?php echo $this->getbaseurl(); ?>"><span><?php echo $this->__('home'); ?></span></a> </li> <?php endif; ?> <?php echo $_menu; ?> </nav> <?php endif ?> if copy code , place in content gives me error:
there has been error processing request exception printing disabled default security reasons. error log record number: 796667554198 do know why happening , how can fix it?
thanks in advance!
in app/design/frontend/base/default/layout/page.xml (or own path) must have lines tells magento add menu header, lines:
<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> so, remove lines , add content block, in same file down there. should this:
<block type="core/text_list" name="content" as="content" translate="label"> <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> <label>main content area</label> </block>
Comments
Post a Comment