Developer forum

Forum » CMS - Standard features » WebsiteLanguages

WebsiteLanguages

Thomas Schroll
Reply

Hi

It's great with the new WebsiteLanguages loop, but I really miss a PageID tag, that can be used to link to the equivalent page on another language layer and an IsActive tag that can be used to exclude inactive language layers.

Regards Thomas


Replies

 
Mikkel Ricky
Reply

The WebsiteLanguages loop is only intended to list website languages. You should use the Languages loop if you want to switch between equivalent pages in different languages.

Both loops include inactive websites/languages, but this is a bug.

Best regards,
Mikkel

 
Thomas Schroll
Reply

Ok. But why have two different loops? If I need to have a language selection menu that links to the equivalent page in another language, I cannot use the Languages loop because it will not show languages where the equivalent page is not present. I cannot use WebsiteLanguages either, because the loop does not have a link to the equivalent page.

Am I missing the obvious? Does anybody know how to do this?

Regards Thomas

 
Mikkel Ricky
Reply

The Languages loop does exactly what you want to do, but – as you point out – only when all pages exist in all languages. To make it work for pages that do not exist on all languages will require a more involved and performance heavy computation, but it can be done.

Best regards,
Mikkel

 

 
Thomas Schroll
Reply

Ok, thanks Mikkel. Is there any chance that the information will be added to one of the loops in the future?

Regards Thomas

 

You must be logged in to post in the forum