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.

 

MetaMod Pro, modules don't disapear

MetaMod Pro, modules don't disapear

Hello,

I have debug advanced on.
I want de rightkolom 'sidebar-b' emty and disapear on the check-out-page of VM.

This is wat de debug shows on the site

Code:

if (

$option == 'com_virtuemart'
and $view == 'cart'
and $Itemid == NULL
and $jinput->get('filter_product') == '0' /*!*/
and $jinput->get('lang') == 'nl' /*!*/
) return XXX; /* replace XXX with the module ID or position to display */

This is what I put in the module

Code:

if  (!(

$option == 'com_virtuemart'
and $view == 'cart'
and $Itemid == NULL
and $jinput->get('filter_product') == '0' /*!*/
and $jinput->get('lang') == 'nl' /*!*/
)) return sitebar-b; /* replace XXX with the module ID or position to display */

Why does it nog work?
Thanks for the help.

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

Re: MetaMod Pro, modules don't disapear

Everything ok Stephen ? I see everywhere fast en extended replays on the new posts.  I have to finish this site an I am in a bit off a hurry.
Thanks..

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

Re: MetaMod Pro, modules don't disapear

Hi lode999,

sorry for the delayed reply.

Some notes:

1 - when you return a module position in MetaMod, you should enclose it in double quotes:

return "sitebar-b";

2 - when you return a module position rather than a module ID, this does not switch the named module position on and off. What it does is to include ALL of the other modules from the stated module position, into the place where the MetaMod is. So if your MetaMod is in position "left" and you return "sitebar-b" then all the modules from sitebar-b will be placed into "left".

3 - Here's what I suggest in your case:

- to make things easier, edit all of the modules in sitebar-b and put them into a new "virtual" module position, called "sitebar-b-virtual". This does not exist (I assume), but you can assign them there anyway.
- then create a MetaMod in sitebar-b. In it, use the following PHP:

if  (!(
$option == 'com_virtuemart'
and $view == 'cart'
)) return "sitebar-b-virtual";

Then, on all pages except for the cart page, the modules assigned to sitebar-b-virtual will be placed into sitebar-b.

You may also need MetaMod Pro in order for the sitebar to collapse properly on the cart pages. This is because there will always be a published module in that page (the MetaMod), so this prevents the position from collapsing. The Pro version is able to get around this and allows it to collapse even though there's a MetaMod in there (as long as the MetaMod does not include any other modules).

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

Re: MetaMod Pro, modules don't disapear

Thank you, Stephen, for your extended reply.

I have tried nr 3 and I already had the PRO version.

On the checkoutpage it works like you said.
But on al the other pages there are no modules in sidebar-b.
And there is an error message ' can't load modules'

If you look at the site there is a little bug in de template. When sitebar-b is empty sitebar-a is shown ate teh right of the maincontent in stead of staying at te left of it. So that menu you see ont het right is in position sitedebar-a and not in sidebar-b.

Thank you for your support.

Lode

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

Re: MetaMod Pro, modules don't disapear

Hi Lode,

the PHP code I suggested relies on there being some modules in a position called "sitebar-b-virtual". Did you remember to change all the modules that were in sitebar-b and assign them to sitebar-b-virtual instead? If you didn't, then Joomla will complain about not being able to load any modules.

If you *did* do that then I am not sure what's going on... I'd be happy to log in to your site to check it for you, if you want to create a login for me.

Best regards,
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
3329 Posts
User info in posts
Administrator has disabled public posting

Re: MetaMod Pro, modules don't disapear

Hello Stephen,

Thank you for the great support. A lot of suppliers of extentions can learn from it.

It works like you  wrote. I took an other look, and it was me who caused it.

In stead of sidebar, I had written sitebar with a "t" and not a "d".
Then first I got a blanc screen with erros. But afther cleaning the cache it works fine.

I'm curious to find out what else is possible with this module.
So I will take the time to figure that out on a test site.

Thank you for the excellent support

Best Regards,

Lode

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

Board Info

Board Stats:
 
Total Topics:
1698
Total Polls:
6
Total Posts:
5944
Dormant:
User Info:
 
Total Users:
5595
Newest User:
gary099231
Members Online:
1
Guests Online:
544

Online: 
gary099231

Forum Legend:

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