redfordnl Posted October 19 Share Posted October 19 (edited) Hello everybody, We are now working on our internal linking building. We have the website setup in 7 languages. If we want add internal links to a product/category description we now have to look up every URL in all 7 languages and add them manually 1 by 1. So a lot of work, what we think can be done more quickly, but we can't find the right way. In TPL files you can add the following code to a multilangual link for example: <a href="{$link->getCMSLink(16)}" target="_blank">LINK TEXT</a> <a href="{$link->getCategoryLink('12')}" target="_blank">LINK TEXT</a> Etc... But this is not working for category/product (short) descriptions in BO. The link is not working this way. It will add the variable behind yoursite-link this way:https://yoursite.com/en/home/{$link->getCMSLink(16)} https://yoursite.com/en/home/{$link->getCategoryLink('12')} Are we doing something wrong? Any solution maybe? Thanks in advance. Edited October 19 by redfordnl (see edit history) Link to comment Share on other sites More sharing options...
Divine Posted October 20 Share Posted October 20 Hello, Which version of Prestashop do you use ? Link to comment Share on other sites More sharing options...
redfordnl Posted October 21 Author Share Posted October 21 Hi, Thank you for your answer! I use Prestashop V8.01 Greetings! Link to comment Share on other sites More sharing options...
NordicDesigner Posted October 21 Share Posted October 21 (edited) Hey, redfordnl! Unfortunately, PrestaShop's WYSIWYG editor in the Back Office doesn't natively support dynamic variables like {$link->getCMSLink(16)} for internal links in descriptions. To simplify adding multilingual internal links, one approach is to use URL rewriting. Instead of adding each language-specific URL manually, you can try adding links without the language code, like /product-name, and PrestaShop should automatically redirect it to the correct language version based on the user's language settings.Alternatively, for a more automated solution, you may need to develop or find a custom module that automatically generates language-specific URLs in descriptions. This way, you can streamline the process for your internal linking across different languages without needing to update them manually every time. Edited October 21 by NordicDesigner (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now