Jump to content

[SOLVED] Link to CMS page in PERMANENT LINKS block of PAGE HEADER


Recommended Posts

Hi,
I found a clearly described  solution at:
http://www.templatemonster.com/help/prestashop-how-to-add-cms-page-with-link-in-headerfooter-menu.html

Hope that some of you will find it useful too.

....................................................................

 

 

Hi,

I am working with PS 1.5.6.1

Here is my problem:
I created CMS ABOUT US page with a link at Main Menu in Page Header. Original link to the CMS  ABOUT US is: index.php?id_cms=4&controller=cms&id_lang=1
This work fine.
Bur, I won't to place
ABOUT US link in the PERMANENT LINKS block in PAGE HEADER.


I modified blockpermanentlinks-header.tpl
………………………………………………….
<section class="header-box blockpermanentlinks-header">
    <ul id="header_links" class="hidden-xs">

        <li><a href="{$link->getPageLink('index.php')}" class="header_links_home">{l s='home' mod='blockpermanentlinks'}</a></li>
        <li id="header_link_about-us"><a class="header_links_about-us" href="{$link->getPageLink('about-us')|escape:'html'}" title="{l s='about-us' mod='blockpermanentlinks'}">{l s='about us' mod='blockpermanentlinks'}</a></li>
        <li id="header_link_contact"><a class="header_links_contact" href="{$link->getPageLink('contact', true)|escape:'html'}" title="{l s='contact' mod='blockpermanentlinks'}">{l s='contact' mod='blockpermanentlinks'}</a></li>
        <li id="header_link_stores"><a class="header_links_stores" href="{$link->getPageLink('stores')|escape:'html'}" title="{l s='Stores' mod='blockpermanentlinks'}">{l s='location' mod='blockpermanentlinks'}</a></li>
        <li id="header_link_sitemap"><a class="header_links_sitemap" href="{$link->getPageLink('sitemap')|escape:'html'}" title="{l s='sitemap' mod='blockpermanentlinks'}">{l s='sitemap' mod='blockpermanentlinks'}</a></li>
        
    </ul>
………………………………………………….
Brawser displays link name in the right place but link doesn't work.
The message tells - Page cannot be found. It means that link which goes the CMS file is wrong. Where can I find the proper address to this page?

Can anybody tell my what wrong I am doing?

 

Regards.

post-799470-0-04122900-1422083919_thumb.jpg

Edited by artway (see edit history)
Link to comment
Share on other sites

Hi, here is more info about my problem with PrestaShop 1.5.6



 

1. I created CMS ABOUT US page in PREFERENCES > CMS


2. I placed ABOUT US button in MENU TOP LINKS. It works fine.


3. Next I placed ABOUT US button in CMS page in PERMANENT LINKS Block (very top set of links).*


3a. I was able to do so by putting extra code in blockpermanentlinks-header.tpl file
(themes > themeXXX > module > permanentlinks >  blockpermanentlinks-header.tpl)
....................................................


<!-- Block permanent links module HEADER -->
<section class="header-box blockpermanentlinks-header">


 

<ul id="header_links" class="hidden-xs">


<li><a href="{$link->getPageLink('index.php')}" class="header_links_home">{l s='home' mod='blockpermanentlinks'}</a></li>


 

<li id="header_link_about-us"><a class="header_links_about-us" href="{$link->getPageLink('about-us', true)|escape:'html'}" title="{l s='about-us' mod='blockpermanentlinks'}">{l s='about us' mod='blockpermanentlinks'}</a></li>
 

 

<li id="header_link_contact"><a class="header_links_contact" href="{$link->getPageLink('contact', true)|escape:'html'}" title="{l s='contact' mod='blockpermanentlinks'}">{l s='contact' mod='blockpermanentlinks'}</a></li>


 

<li id="header_link_stores"><a class="header_links_stores" href="{$link->getPageLink('stores')|escape:'html'}" title="{l s='Stores' mod='blockpermanentlinks'}">{l s='stores' mod='blockpermanentlinks'}</a></li>
 

 

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

</ul>


....................................................

4. The problem is that the link doesn't work.
The original CMS ABOUT US link (in Module BLOCK TOP Menu) is:
index.php?id_cms=4&controller=cms&id_lang=1

I tried many different hrefs: cms&id_lang=1 / 1 / about-us
None of them works.

Any clue?

Link to comment
Share on other sites

  • 4 months later...
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...