Categories

Featured templates

Prestashop 1.5.x. How to add CMS page with link in header/footer menu

Rating: 3.0/5. From 2 votes.
Please wait...

The following tutorial is going to show you how to add CMS page with link in header/footer menu.

Prestashop. How to add CMS page with link in header/footer menu

1. Login to your PrestaShop admin panel.

2. Navigate to Preferences -> CMS. There you can find all the CMS pages which are created in your PrestaShop.

3. Click Add new button to add new CMS page

4. Fill in all the required fields, enable the page and save the changes.

5. Remember CMS page ID (displayed on the first column in the list). We will need it later.

6. Navigate to Modules -> Positions in your PrestaShop admin panel.

7. Check which module is displaying top menu in your template. Most likely it is inserted to Top of pages position. The module name is Permanent links block in our case.

8. Connect via FTP to your domain (please contact your hosting provider if you do not know how to do it).

9. Navigate to /themes/themeXXX/modules/blockpermanentlinks folder (where themeXXX is your theme name) and edit blockpermanentlinks-header.tpl file using any code/text editor.

10. Each list element in the code represents one menu element. E.g.

<li id="header_link_sitemap"><a href="{$link->getPageLink('sitemap')}" title="{l s='sitemap' mod='blockpermanentlinks'}">{l s='sitemap' mod='blockpermanentlinks'}</a></li>

stands for Sitemap menu element.

Copy that line and insert it on the new line, right next the one you have copied. Change it to:

<li><a href="{$link->getCMSLink('7', 'CMSpage')}" title="{l s='CMS page' mod='blockpermanentlinks'}">{l s='CMS page' mod='blockpermanentlinks'}</a></li>

$link->getCMSLink(‘7’, ‘CMS page’) means that we want to load CMS page with ID 7. s=’CMSpage’ – is displayed page name.

11. Save the file. We have added link to CMS page to top menu.

Now we will add the same link to Footer menu.

12. Navigate to Modules -> Positions in your PrestaShop admin panel.

13. Check which module is displaying footer menu in your template. Most likely it is inserted to Footer position. The module name is CMS Block in our case.

14. Connect via FTP to your domain (please contact your hosting provider if you do not know how to do it).

15. Navigate to /themes/themeXXX/modules/blockcms folder (where themeXXX is your theme name) and edit blockcms.tpl file using any code/text editor.

16. Search for <div id="block_various_links_footer" class="block_various_links"> section.

17. Again, each list element represents one menu element. E.g.

<li class="item"><a href="{$link->getPageLink($contact_url, true)}" title="{l s='Contact us' mod='blockcms'}">{l s='Contact us' mod='blockcms'}</a></li>

stands for Contact us menu element.

Copy that line and insert it on the new line, right next the one you have copied. Change it to:

  • <a href="{$link->getCMSLink('7', 'CMSpage')}" title="{l s='CMS page' mod='blockcms'}">{l s='CMS page' mod='blockcms'}</a></li>

    $link->getCMSLink(‘7’, ‘CMSpage’) means that we want to load CMS page with ID 7. s=’CMS page’ – is displayed page name.

    18. Save the file. We have added link to CMS page to footer menu.

    Feel free to check the detailed video tutorial below:

    Prestashop. How to add CMS page with link in header/footer menu


  • Prestashop Themes
    This entry was posted in PrestaShop Tutorials and tagged add, archived_tutorial, CMS, footer, header, link, menu, page, Prestashop. Bookmark the permalink.

    Submit a ticket

    If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket