Question

I want to get Joomla menu description in mod_menu/default.php . How can i get it to modify?

Joomla menu description

Was it helpful?

Solution

You can query the database from your module to get the Menu Description of your desired menu:

The code will look like:

$db = JFactory::getDbo();

$query = $db->getQuery( true );
$query->select( 'description' )
    ->from( '#__menu_types' )
    ->where( 'id = '{your menu item id, e.g. 1}' );

$db->setQuery( $query );
$description = $db->loadResult();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top