Magento Ecommerce – Create New CMS Page & Add Link in Top Menu Along with Category Links
Magento Ecommerce: Create a new CMS page and have the link to it show up in the menu alongside the category links.
Brick House Bakery project: adding the Survey page link to the top navigation bar, alongside the existing category links.
1. Create a new CMS page, titled Survey, in Magento’s admin (Admin > CMS > Manage Pages > Add New Page)
This is our newly-created page’s path: http://www.brickhousebakery.com/survey
2. Add “Survey” link as a line-item (<li>) to the top menu (root > magento > app > design > frontend > default > default > template > catalog > navigation > top.phtml)
* NOTICE OF LICENSE
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to firstname.lastname@example.org so we can send you a copy immediately.
* @category design_default
* @package Mage
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* Top menu for store
* @see Mage_Catalog_Block_Navigation
<h4 class=”no-display”><?php echo $this->__(‘Category Navigation:’) ?></h4>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
<!– bof – added line-item so survey link will appear in the navigation alongside the existing category links –>
<!– eof – added line-item so survey link will appear in the navigation alongside the existing category links –>
<?php echo $this->getChildHtml(‘topLeftLinks’) ?>
So is there actually a way to do it dynamically or just hard coded?
Also – I can’t really find the way to display categories in the top navigation in the first place. I’ve been searching internet for hours now and nothing – any tip?
The Survey text link that was added to the navigation bar was hard coding into top.phtml. I don’t know of a way to do it dynamically.
With regard to displaying category links in the top navigation: do you mean displaying links in the “header-nav,” which contains all of the category titles, or displaying links in the “shop-access” nav, which is part of the “quick-access” section?
If you mean category links in the “header-nav,” please read: http://www.magentocommerce.com/wiki/welcome_to_the_magento_user_s_guide/chapter_3#creating_categories
If you mean links in the “shop-access” nav, I haven’t attempted to add any links to that section yet and don’t have any followup information.
After reading through the Magento User Guide it’s very clear how to create a new category and make the settings so that it will display as a link in the main navigation.
BUT after making these settings I am still not seeing these categories as links in my navigation.
After looking at top.phtml file it has the code to pull the categories…
Any Ideas ? Thanks!
As far as I can tell, Magento requires products to be in a category in order for the category link to appear in the navigation. Please make sure you have products in your categories.
Thanks! Exactly what I was looking for.