O'Reilly logo

OpenCart 1.4 Template Design Cookbook by Tahsin Hasan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sitemap creation

This recipe will show us how we can create a sitemap for our store. Sitemap is the page that has links for the main pages or features of the website. We are going to apply some styling to the sitemap here.

Getting ready

Let's start our work for sitemap creation. We open up the sitemap.tpl file under the Catalog\view\theme\shop\template\information.

How to do it...

Now, we will see a step by step guide on how to modify our sitemap:

  1. The default sitemap is created with a two-column table. We will change the structure to div tags. And also add a sitemap-tree class to the div in the sitemap.tpl:
    <div class="sitemap-tree">
    <?php echo $category; ?>
    </div>
    <div class="sitemap-tree">
    <ul>
    //...
    </ul>
    </div>
    
  2. With the div and without the table ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required