jsmonzani trick for multilingual
Posted: Mon Apr 25, 2016 4:17 pm
Hello,
I tried to update trick jsmonzani for CMS 2.1.2:
http://forum.cmsmadesimple.org/viewtopic.php?t=11756
Unfortunately without success. someone has a track for me?
Thanks in advance
I tried to update trick jsmonzani for CMS 2.1.2:
http://forum.cmsmadesimple.org/viewtopic.php?t=11756
Unfortunately without success. someone has a track for me?
Code: Select all
$gCms = cmsms();
$smarty = $template->smarty;
$manager =& $gCms->GetHierarchyManager();
$thisPage = $gCms->variables['content_id'];
$thisPage = intval($params['pageid']);
$currentNode =& $manager->sureGetNodeById($thisPage);
$currentContent =& $currentNode->getContent();
if ($smarty->get_template_vars('weblang') == "fr") {
$t_ =$currentContent->MenuText();
} else {
$t_ =$currentContent->GetPropertyValue('menu_' . $smarty->get_template_vars('weblang'));
}
$smarty->assign('current_menu_text', $t_);