I think JParameter is deprecated in Joomla! 3.x, so the answer now looks something like this:
$app = JFactory::getApplication(); $menuitem = $app->getMenu()->getActive();
You can get the menu_image variable by doing:
echo $params->get('menu_image');
Or first check if it is full, and if it is, echo it:
Or using the tertiary statement:
$menuimg = $params->get('menu_image') echo strlen($menuimg) ? "<img src='$menuimg'/>" : '';
source share