E
E
Eugene2017-09-11 10:25:42
MODX
Eugene, 2017-09-11 10:25:42

How to display a link to the current page in Modx Revo?

The header displays two links to the eng and ru versions of the site via Babel. But what is the parameter to make it so that the link is not to the main language (site.ru/en/), but to the translation of the current page? For example, I'm on the "Valenki" page, when I click on EN I get to the same page, but the English version

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Ulo, 2017-09-11
@Salexer

Babel has its own snippet
for this. In general, babel writes the id of the translated page to a hidden TV, which, I don’t remember, you can also take tv. But it's better to use a snippet.

A
Alexander Kuznetsov, 2017-09-11
@DarkRaven

https://docs.modx.com/extras/revo/babel/babel.babe...
It will return the translation ID, also pay attention to the options

O
Oleg, 2017-10-08
@ovvivus

When I tested Babel, I did not encounter such a problem: the translation worked for the current page. Perhaps you have a static link in the header to the main page with English. Try to take a closer look at the default chunks that Babel offers and how they are used on your site. A link to the documentation has already been sent to you: https://docs.modx.com/extras/revo/babel/babel.babe...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question