Jump to content
prestatent

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.

Share this post


Link to post
Share on other sites

Good morning

 

Have you had a look at:

 

Back office 》 Preferences 》 CMS

 

Paul

Share this post


Link to post
Share on other sites

 

 

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

how you defined these links?

Share this post


Link to post
Share on other sites

Thank you both for your replies.

 

In both template files the links are hardcoded as they are in the default template, so as you know, if you want to add another link you have to code it yourself.

Share this post


Link to post
Share on other sites

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>

Share this post


Link to post
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

Share this post


Link to post
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!

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More