WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Multilanguage and onepage layout
  • Print
Pages: [1]   Go Down

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

Offline RonR

  • Posts: 59
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
Logged

Offline Ruud

  • Posts: 3671
  • 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.
Logged
Dev4me - WebsiteBaker modules - WBhelp.org

Offline RonR

  • Posts: 59
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
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Multilanguage and onepage layout
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2