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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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