If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)


PrestaShop 1.4.x. How to manage header links

TM headerlinks for Prestashop module is located at the top of the site and displaying links to your site pages.

To add or remove an element to TMheaderlinks module you should edit tmheaderlinks.tpl file.

The file is located under /modules/tmheaderlinks folder.

Open the file using any code editor.

The menu is created using unordered list

Each menu element is wrapped with <li> </li&gt tags

The following line of code represents Sitemap menu element

<li><a href="{$link->getPageLink('sitemap.php')}"{if $page_name == 'sitemap'} class="active"{/if}>{l s='sitemap' mod='tmheaderlinks'}</a></li>
a href="{$link->getPageLink('sitemap.php')}" - is the URL to the page
{l s='sitemap' mod='tmheaderlinks'} - is the code for displaying name of the button

To add link to Best Sellers page (http://yourdomain.com/best-sales.php) you should add the following line of code to /modules/tmheaderlinks/tmheaderlinks.tpl file

<li><a href="{$link->getPageLink('best-sales.php')}"{if $page_name == 'best-sales'} class="active"{/if}>{l s='best-sales' mod='tmheaderlinks'}</a></li>

And clean smarty cache

To change the name of the button you should login to your Prestashop admn panel and naviagate to Tools -> Translations -> select Module Translation from the drop-down menu and click on corresponding flag icon.

Search for tmheaderlinks and define a new name for best-sales

Scroll down and press Update translations button to save the changes

To add link to some CMS page you should get the link to the page first. Let’s say it is http://yourdomain.com/cms.php?id_cms=4

You should edit /modules/tmheaderlinks/tmheaderlinks.tpl file and add the following line of code

<li><a href="{$link->getPageLink('cms.php?id_cms=4')}"{if $smarty.get.id_cms == '4'} class="active"{/if}>{l s='about-us' mod='tmheaderlinks'}</a></li>

Note! The syntax for active highlighting is different for CMS pages.

Feel free to check the detailed video tutorial below:

Prestashop. How to manage header links

PrestaShop 1.4.x. How to manage header links, 2.8 out of 5 based on 4 ratings