Jump to content
JackiiBE

Creating a multilingual link to a CMS page in Prestashop

Recommended Posts

I want to make a link to a CMS page in prestashop, the webshop has 3 languages. How do i make the link autoswitch the language?

When you make a cms-page, you can enter the translations for the title of that page. So i have to get that title in the code?

This is what i have now (which stays in English when i switch the language):

<a href='{$link->getCMSLink('8', 'about-us')}' title='{l s='About us'}'>{l s='About us'}</a> 

Thanks,

Grafoman

 

 

 

Share this post


Link to post
Share on other sites

Hi,

 

When i switch the language, the link on the page is still 'About us' . So it does not change?

Share this post


Link to post
Share on other sites

I translated the CMS pages in the backoffice. 

I'm editing the header.tpl to make a custom navigation.

Share this post


Link to post
Share on other sites

To clarify the problem: 

 

I know how to link to a cms-page but i don't know how to display only the cms page name for the link. For instance:

<a href='{$link->getCMSLink('8')}'>{$link->getCMSLink('8')}</a>

Gives me the link HTTP://GRAFOMANTESTSITE.BE/NL/CONTENT/8-OVER-ONS

But i only want 'Over ons' as link to click. 

Edited by JackiiBE (see edit history)

Share this post


Link to post
Share on other sites

So, did you find how to show the translations?

I'd like to know how to do it.

Thanks.

Share this post


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

Important Information

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