I am assigning a php module on different menus on my Joomla website, but I want the module to show different data when loaded on different menu pages.
Example : There is parent menu Home and three sub-menus, Sub-menu1, Sub-menu2 and Sub-menu3.
When user browses sub-menu1 page, the module should load "Welcome to Sub-menu1" and when the user is on sub-menu2 page, the module should load "Welcome to sub-menu2" and so on. I have around 200 sub-menu pages on my Joomla website and I don't want to assign 200 individual php modules for them. I guess it would require an IF/ELSE condition but are there any specific ID's allotted to the Joomla menus? If yes, how can I retrieve the data (menu IDs) while loading the module and use the IF/ELSE condition?
P.S I have already imported the Joomla CMS (Joomla 3.4.8) using this :
define( '_JEXEC', 1 );
define( 'JPATH_BASE', realpath(dirname(__FILE__).'/' ));
require_once ( JPATH_BASE .'/includes/defines.php' );
require_once ( JPATH_BASE .'/includes/framework.php' );
$app = JFactory::getApplication('site');
Help would be appreciated!