[英]How can i get menu description in Joomla
I want to get Joomla menu description in mod_menu/default.php . 我想在mod_menu / default.php中获得Joomla菜单说明。 How can i get it to modify? 我该如何修改它?
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();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.