Hide a module when an URL or a component

I am using JSjobs as component. My template is not so good in the sense that when i use a search module to search a job, the results display in a page of the component i can't control.

My problem is that in this case all the modules of my homepage appear also including the slideshow.

In consequence i was thinking using metamode to hide all the module i don't want to get when displaying the results of my search with Js Jobs modules.

I found out that address is index.php?option=com_jsjobs&c=jsjobs&view=jobseeker&layout=job_searchresults&Itemid=1

Hence, I have written the following in the PHP text area of methamod to make a test:
if ( $option == "com_jsjobs" and $c == "jsjobs" and $view == "jobseeker" and $layout == "job_searchresults" and $Itemid == 1 ) return 47;

If course i want to get the opposite: hide module when getting this url.

So my two problems are the following:

1. my syntax looks bad somewhere since module 47 doesn't appear when reaching this url
2. How to do the opposite ? Hide module when getting this url ?

Re: Hide a module when an URL or a component

Here is what i get in the metamod module is not submited to search:

Page Identification
The PHP code below may be used to help MetaMod to identify the exact page that you are viewing. For help using this feature, please click here.
if (
$option == 'com_content'
and $view == 'frontpage'
and $Itemid == '1'
and JRequest::getVar('limit') == 1 /*!*/
and JRequest::getVar('layout') == 'default' /*!*/
) return XXX; /* replace XXX with the module ID or position to display */
Note: lines starting with "and" and ending with /*!*/ contain rules that may be optional. You may wish to leave them out.
MetaMod debug info:
$option: com_content
$view: frontpage
$id:
$Itemid: 1
$timezone: default
$language: en-gb
$language_code: en
$language_region: gb
Including modules:

And here is what i get when i perform a search :
Page Identification
The PHP code below may be used to help MetaMod to identify the exact page that you are viewing. For help using this feature, please click here.
if (
$option == 'com_jsjobs'
and $view == 'jobseeker'
and $Itemid == '1'
and JRequest::getVar('uid') == ''
and JRequest::getVar('submit_app') == 'Search Job'
and JRequest::getVar('company') == ''
and JRequest::getVar('jobsalaryrange') == ''
and JRequest::getVar('title') == ''
and JRequest::getVar('isjobsearch') == '1'
and JRequest::getVar('layout') == 'job_searchresults'
and JRequest::getVar('c') == 'jsjobs'
) return XXX; /* replace XXX with the module ID or position to display */
MetaMod debug info:
$option: com_jsjobs
$view: jobseeker
$id:
$Itemid: 1
$timezone: default
$language: en-gb
$language_code: en
$language_region: gb
Including modules: 47

Now that's starting to look very much like the original one... but that's ok - you confirmed that much from the debug output.

don't forget a few other things:

1 - don't put anything in the "quick module id include" box if you're using a PHP rule like this.
2 - make sure that the target module is disabled. MetaMod will auto-enable it when it includes it (there's an option for that in MetaMod)

Hope that helps,
Stephen

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

Re: Hide a module when an URL or a component

Hi zbabyface,

sorry for the delayed reply. Can you turn on MetaMod Advanced Debug mode, and post the output of the MetaMod when you are viewing the register.html page? There will be information from there that will make it easier to design a rule.

Cheers,
Stephen

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