Author Topic: Multilanguage and onepage layout  (Read 2171 times)

Offline RonR

  • Posts: 26
Multilanguage and onepage layout
« on: April 21, 2017, 12:04:54 PM »
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

Offline Ruud

  • Posts: 3650
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Multilanguage and onepage layout
« Reply #1 on: April 21, 2017, 12:27:22 PM »
The get_onePagerData() is starting with this query:
Code: (original) [Select]
$p = $database->query("SELECT * from ".TABLE_PREFIX."pages where `visibility` = 'public' order by `position`");
Try changing that to:
Code: (untested) [Select]
$p = $database->query("SELECT * from ".TABLE_PREFIX."pages where `visibility` = 'public' AND `language`='".LANGUAGE."' order by `position`");
It should get only pages in the current language.

Offline RonR

  • Posts: 26
Re: Multilanguage and onepage layout
« Reply #2 on: April 21, 2017, 12:33:51 PM »
Works like a charm!
Thanks for your help, Ruud!

Ron