- Moderated by:
- Support
-
- rank:
-
Helper
- registered:
- March 2003
- Status:
- offline
- last visit:
- 09.06.06
- Posts:
- 104
Do you need to show a different Dynamenu inside a Xanthia theme depending on the present language? Here is a plugin that will do the job:
Code
<?php
function smarty_function_dynamenu($params, &$smarty)
{
// Show a specific dynamic menu block
$lang = pnUserGetLang();
if ($lang=="ita") {
$block = pnBlockGetInfo('XX');
$block['bid'] = 'XX';
} else {
$block = pnBlockGetInfo('YY');
$block['bid'] = 'YY';
}
pnBlockShow('Core', 'dynamenu', $block);
return;
}
?>
Replace the XX and YY with the id of the blocks you want to use and ita with the 3 letters of your main language.
Name it function.dynamenu.php and save inside the plugins directory of the Xanthia module. Put a call like:
in your master.htm and here you are!Code
<!--[dynamenu]-->
--
Sesto Avolio -
- rank:
-
Professional
- registered:
- September 2003
- Status:
- offline
- last visit:
- 11.04.08
- Posts:
- 3055
That's pretty nifty, Sesto - nice work! (Though as an ego-centric Yank I only speak one language - O.K., maybe a little French!)
--
Get PhotoGallery, PayPalCart, Dynamenu, Enhanced Blocks & other mods
Cape Cod Travel Info...
