Front-end Web Developer | Tampa, FL

Posts Tagged ‘Magento’

How to create custom page in Magento

Posted on: February 11th, 2010 by admin No Comments
  • 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
  • In Custom Design select Layout * (1 column, 2 columns with left bar, 2 columns with right bar, 3 columns)
    Magento custom page creating
  • 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:

    {CODE type:php;}
    <li><a href=”<?php echo $this->getUrl(‘about-us’)?>”><?php echo $this->__(‘About Us’) ?></a></li>
    {/CODE}

    as shown:

    {CODE type:php;}
    <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>
    {/CODE}

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

    Have fun! 🙂