Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

How to show module on specific layout?

How to show module on specific layout?

Hi,
I want to show a module on page where non SEF url is: index.php?option=com_easysocial&view=events&layout=create

Code:

MetaMod debug info:

Module ID: 406
$option: com_easysocial
$view: events
$id:
$Itemid: 1176
$timezone: UTC

I dont see $layout variable in debug info, so is tehre a way to  use PHP in MetaModPro to trigger module on this view?

dc006
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Re: How to show module on specific layout?

Hi dc006,

yes, you can get at arbitrary URL parameters by using $jinput:

if ($option == 'com_easysocial' and $view == 'events' and $jinput->get('layout') == 'create') {
//... code here
}

If you switch on Advanced Debug mode in MetaMod it should actually give you PHP code to detect the current URL.

Cheers,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3319 Posts
User info in posts
Administrator has disabled public posting

Re: How to show module on specific layout?

That works! Thank you for pointing me to advance debug mode.

dc006
Beginner Modder
ranks
useravatar
Offline
5 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1675
Total Polls:
6
Total Posts:
5917
Posts this week:
6
User Info:
 
Total Users:
11584
Newest User:
allen6221
Members Online:
0
Guests Online:
134

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked