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.

 

hiding module with metamodpro DOESN´T WORK

hiding module with metamodpro DOESN´T WORK

hello , i have the follwoing information:
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_search'
and $view == 'search'
and $Itemid == '53'
and JRequest::getVar('searchphrase') == 'all'
and JRequest::getVar('ordering') == ''
and JRequest::getVar('searchword') == 'casa'
) return XXX; /* replace XXX with the module ID or position to display */

SO I WORITE A METAMOD MODULE IPUBLISHED IN ALL PAGES OF MY SITE WITH THE FOLLOWING:

if ( ! (
$option == 'com_search'
and $view == 'search'
) ) return 138;

I WANT TO HIDE MODULE 138 AND OTHER IN ALL SERACH RESULTS PAGES AND IT STILL APPEARS. I M USING METAMOPRO AND ROCKETTHEME TEMPLATE. PLEASE HELP

Mariana

Edited By: marianafrade
30-Apr-11 13:16:59

marianafrade
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: hiding module with metamodpro DOESN´T WORK

Hi Mariana,

The PHP itself looks good. This should show module 138 on all pages EXCEPT where option is com_search and view is "search".

Have you followed the instructions in the Quick Start Guide?

http://www.metamodpro.com/metamod/quick-start

Specifically you need to make sure that the target module (not the MetaMod) can't show up unless/until the MetaMod includes it. This is generally done by disabling it, or setting it to "none" menu items, or setting it to a module position that doesn't actually exist on the page.

The other thing is that you need to ensure that the "Quick module position or id include" box is empty. Sometimes people put the module id in there... but if you are using a PHP rule then you almost always need it to be empty.

Hope that helps,
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
3313 Posts
User info in posts
Administrator has disabled public posting

Re: hiding module with metamodpro DOESN´T WORK

hello...

this makes things really difficult in terms of organization. it implies that all my modules should be set to none in menu assignement. can you image the mess?

i found a solution assingning an item id to the com_search display page.

Also, i m having troubles hidding another module in the com content and view article display, sometimes it work sometimes it doesn´t. IN ONE SPECIFIC ARTICLE / CATEGORIE THE MODULES ARE STILL SHOWING UP.

THIS IS REALLY CONFUSING

THANK YOU

marianafrade
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Re: hiding module with metamodpro DOESN´T WORK

Hi Mariana,

Sorry you're still having some trouble with this.

1 - module organisation. There are several options for how to organise modules when you are making extensive use of MetaMod. One way is to keep them as unpublished (but I think that's even more confusing). Another is to keep them published but set to "none" which you don't like. My preferred option is to set them to a brand new module position that doesn't actually exist on the template. This has a number of advantages including organisation.

e.g. I am using more than one template on my site, and I want a different set of modules to appear in the "right" position for each template. So I create all the modules for template1 and put them into a position called "right-template1". For template2 I do the same and put them into a position called "right-template2", and so on.
Then I assign a single MetaMod into the real "right" position. In this MetaMod I put some code that detects the template. Depending on the template it then pulls in all the modules from one of the other positions.
In this way, I can add modules into any of those other "virtual" positions, shuffle them around etc, and I never need to touch the MetaMod again. Furthermore it's very easy to see which modules are set aside for which template, just by looking at the module positions.

The same technique can be adapted for lots of other uses too.

2 - hiding modules in com_content and article view pages sometimes does not work:

Are you by any chance using the Joomla system cache plugin, or something similar? Or the cache system in the Global Preferences? Both of these are often the cause of seeming randomness with MetaMod and other dynamic modules.


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
3313 Posts
User info in posts
Administrator has disabled public posting

Re: hiding module with metamodpro DOESN´T WORK

Hello.

i confess i don t need metamodpro anymore. I found an advance module manager plugin (FREE) wich enables and isables the modules as i want, in an admin user friendly patch t joomla.

i m sincere telling you i should be asking for my money back....because what is described to work with metamod isnt happening do easily.

however, i thank you for your response.

Mariana

marianafrade
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1680
Total Polls:
6
Total Posts:
5914
Total Posts Today:
1
User Info:
 
Total Users:
10831
Newest User:
bluesky1
Members Online:
0
Guests Online:
87

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