Jump to content

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

 

 

 

Link to comment
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)
Link to comment
Share on other sites

  • 2 years 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...