Jump to content

header and footer links - how to change for different language


Recommended Posts

Prestashop 1.5.4.1

 

Hi

 

Two questions, both related;

 

1. How can I show menu options in blockpermanentlinks-header.tpl in a different language?

 

2. How can I show menu options in blockcms.tpl in a different language?

 

The reason I ask is because there is no backoffice method to add/edit/delete options from these menus.

 

Thanks.

Link to comment
Share on other sites

  • 4 months later...

Hello,

 

I have the same question, please answer, I am using Prestashop 1.5.6, I have found how to manage the links on top menu (header - not the main menu which is using the horizontal top menu module), I have added a custom link (to promotions for example whic is pointing to the promotions page) blockpermanentlinks-header.tpl and I have a problem, I have translated it also in the Installed modules translations but IF I am changing the languages the trasnlations are shown well but even if the language is changed - the link is the same if I am using a static page not getPageLink in php because i donțt how to use that function to get a link from HTML page and automatically change the language - thanks!

<!-- Block permanent links module HEADER -->
<ul id="header_links">

	<li id="header_link_home"><a href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}" {if $page_name=='index'}class="active"{/if}>{l s='Home' mod='blockpermanentlinks'}</a></li>

 
           <li id="header_promotii"><a href=http://www.minimecraft.ro/ro/content/9-promotii title="{l s='Promotions' mod='blockpermanentlinks'}" {if $page_name=='9-promotii'}class="active"{/if}>{l s='Promotions' mod='blockpermanentlinks'}</a></li>

	<li id="header_link_sitemap"><a href="{$link->getPageLink('sitemap.php')}" title="{l s='Sitemap' mod='blockpermanentlinks'}" {if $page_name=='sitemap'}class="active"{/if}>{l s='Sitemap' mod='blockpermanentlinks'}</a></li>

	<li id="header_link_contact"><a href="{$link->getPageLink('contact.php', true)}" title="{l s='contact' mod='blockpermanentlinks'}" {if $page_name=='contact-form'}class="active"{/if}>{l s='Contact' mod='blockpermanentlinks'}</a></li>

</ul>
Link to comment
Share on other sites

problem soved! instead using a static page link such as http://www.minimecraft.ro/ro/content/9-promotii.html as I used before, if you want to use a CMS page use this function getPageLink('cms.php?id_cms=9') where 9 is my id for my CMS page, you can check your specific id in your CMS module

<li id="header_promotii"><a href="{$link->getPageLink('cms.php?id_cms=9')}" title="{l s='Promotions' mod='blockpermanentlinks'}" {if $page_name=='9-promotii'}class="active"{/if}>{l s='Promotions' mod='blockpermanentlinks'}</a></li>

Have a great day!

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

problem soved! instead using a static page link such as http://www.minimecraft.ro/ro/content/9-promotii.html as I used before, if you want to use a CMS page use this function getPageLink('cms.php?id_cms=9') where 9 is my id for my CMS page, you can check your specific id in your CMS module

<li id="header_promotii"><a href="{$link->getPageLink('cms.php?id_cms=9')}" title="{l s='Promotions' mod='blockpermanentlinks'}" {if $page_name=='9-promotii'}class="active"{/if}>{l s='Promotions' mod='blockpermanentlinks'}</a></li>

Have a great day!

Hi Cata,

Thank you a lot, you resolve my problem!

But, do you know how can I make to put an external link? not CMS, for example this external link:

http://www.portaljardin.com/aromaticas.html

Link to comment
Share on other sites

Hi Cata,

Thank you a lot, you resolve my problem!

But, do you know how can I make to put an external link? not CMS, for example this external link:

http://www.portaljardin.com/aromaticas.html

 

resolved!!!

 

Example:

 

title: aromáticas

link: http://www.portaljardin.com/aromaticas.html

 

<li id="header_link_sitemap"><a href="http://www.portaljardin.com/aromaticas.html" title="{l s='aromaticas' mod='blockpermanentlinks'}" {if $page_name=='aromaticas'}class="active"{/if}>{l s='aromaticas' mod='blockpermanentlinks'}</a></li>

 

Note: I´d must create a new id for aromaticas

and not use "header_link_sitemap" whick is used by "sitemap" link

though it works perfectly

Link to comment
Share on other sites

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...