Joomla // Display content in just 1 itemid

$app =JFactory::getApplication('site'); $app->initialise(); $user = JFactory::getUser(); $userId = $user->get('id'); $menu = $app->getMenu(); $active = $menu->getActive(); $active_id = isset($active) ? $active->id : $menu->getDefault()->id; if ($active_id==IDMENUSOUHAITE) { }
Display content in template php directly and show it on 1 menu item only (or 2 menu items, or everwhere but 1, ...)

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.