WebsiteBaker Support (2.8.x) > Templates, Menus & Design

Multilanguage and onepage layout

(1/1)

RonR:
Trying to make a onepage layout template multilingual with Mod Multiligual.

Getting all pages in all languages in the menu, so I need to get the $iMultiLang somewhere in the  function show_menu?

OR a  way to make the "function get_onePagerData()" select only the pages in the current language.

I am not much of a coder.
Anyone any ideas?

Ron

Ruud:
The get_onePagerData() is starting with this query:

--- Code: (original) ---$p = $database->query("SELECT * from ".TABLE_PREFIX."pages where `visibility` = 'public' order by `position`");
--- End code ---

Try changing that to:

--- Code: (untested) ---$p = $database->query("SELECT * from ".TABLE_PREFIX."pages where `visibility` = 'public' AND `language`='".LANGUAGE."' order by `position`");
--- End code ---

It should get only pages in the current language.

RonR:
Works like a charm!
Thanks for your help, Ruud!

Ron

Navigation

[0] Message Index

Go to full version