Home tips How to create custom page in Magento
Thursday, 11 February 2010 19:18

How to create custom page in Magento

In this article i'll show you how to create custom page in Magento

  1. Login to Magento admin panel: www.YourSiteName.com/index.php/admin/
  2. Mouse over on CMS horizontal menu, then click on Manage Pages.
    Magento custom page creating
  3. Then click on Add New Page:
    Magento custom page creating
  4. In General Information add Page Title, SEF URL Identifier, Status, Content. For example we want to create new page "About us":
    Magento custom page creating
  5. In Custom Design select Layout * (1 column, 2 columns with left bar, 2 columns with right bar, 3 columns)
    Magento custom page creating
  6. Add Meta Data if needed, then click on Save Page button.

Now its party time: we need to add some code to our template, so connect to FTP or if you work in local machine find this folder:
app/design/frontend/default/default/template/catalog/navigation/ and open top.phtml file. And add this line:


<li><a href="/<?php echo $this->getUrl('about-us')?>"><?php echo $this->__('About Us') ?></a></li>

as shown:


<ul id="nav">
<li><a href="/<?php echo $this->getUrl('about-us')?>"><?php echo $this->__('About Us') ?></a></li>
<?php foreach ($this->getStoreCategories() as $_category): ?>
<?php echo $this->drawItem($_category) ?>
<?php endforeach ?>
</ul>

Here: about-us it the SEF URL Identifier and About Us is the new menu name.

Have fun! :)


Last Updated on Friday, 19 February 2010 00:44
 

Comments 

 
#1 CodeMyConcept 2011-03-04 20:36
It is more helpful when you show in which part the code must be.

We like your tutorials.
Quote
 

Add comment


Security code
Refresh

© 2010. Sopov.com