简体   繁体   中英

How can i get menu description in Joomla

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

Joomla菜单说明

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();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM