Reputation: 352
I can get current menu title by this code :
<?php
$active = JFactory::getApplication()->getMenu()->getActive();
echo $active->title;
?>
But can I somehow get the menu module name?
Upvotes: 1
Views: 2394
Reputation: 502
The following code use to put title in joomla
$document = JFactory::getDocument();
$document->setTitle('Page Title');
Upvotes: 1
Reputation: 2159
In the event you have multiple menus using 'mod_mainmenu' you could do something like this:
jimport( 'joomla.application.module.helper' );
$module = JModuleHelper::getModule( 'mainmenu', 'ModuleTitle' );
echo '<pre>';
print_r( $module );
echo '</pre>';
That will get you what you're looking for I think.
You can also check up on the JModuleHelper/getModule information in Joomla Docs - by studying that page you'll be able to do exactly what you want with little effort.
Cheers!
Upvotes: 2