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.

 

MetaModPro and MetaTemplate Pro Together

MetaModPro and MetaTemplate Pro Together

Can metamodpro and metatemplate pro be used at the same time? In particular, could each be triggered by the same URL parameter?

Dan
www.topchurchwebsites.com
www.topbusinesswebs.com

topwebs
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: MetaModPro and MetaTemplate Pro Together

Yes, this works well. Together they are a very powerful combination.

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

Re: MetaModPro and MetaTemplate Pro Together

OK, I've purchased MetaMod Pro and MetaTemplate Pro. I would like a certain module displayed if the url parameter contains landing=1, for example www.domain.com/?landing=1. So, my rule is:
if ( $core_genius->check("url=http://www.lifechurchstlouis.org/?landing=1")) return 38;
But the module is not displayed. What am I doing wrong?
I would also like the module display to persist for the user session. Is there a way to make this work like it does in modtemplate pro?

Dan
www.topchurchwebsites.com
www.topbusinesswebs.com

topwebs
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: MetaModPro and MetaTemplate Pro Together

Hi Dan,

have you read through the quick start guide yet? http://www.metamodpro.com/metamod/quick-start

In particular you need to check:

- the MetaMod itself is enabled and assigned to some (or all) pages
- if the target module (the one that you want to be displayed) is disabled, then you need to use the "auto-enable included modules" option
- also, in JomGenius, you need to put spaces around the "=", therefore "url = http://www.lifechurchstlouis.org/?landing=1"

If you're checking for an exact URL then you're doing it the right way - but if you want to check for a particular URL parameter irrespective of page you should do it this way:

If ( JRequest::getVar("landing") == "1" ) return 38;

Finally about sessions: check out these recipes:

Using cookies: http://www.metamodpro.com/metamod/recip … odule-once
Using sessions: http://www.metamodpro.com/metamod/recip … er-session

For your case I'd do it like this:

Code:

$instance_name = "landing1";

if (
  ( isset( $_SESSION[$instance_name] ) and $_SESSION[$instance_name] == true )
  or $core_genius->check( "url = http://www.lifechurchstlouis.org/?landing=1" ) ) {
    $_SESSION[$instance_name] = true;
    return 38;
}

Basically this says "have we already put it into the session? Or, are we seeing this URL for the first time? If either of these conditions are met, then store the result in the session and display module #38.

We use the "instance name" so that you can have several different ones of these operating, and they won't clash with each other.

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

Board Info

Board Stats:
 
Total Topics:
1666
Total Polls:
6
Total Posts:
5909
Dormant:
User Info:
 
Total Users:
10093
Newest User:
lamanaudio
Members Online:
0
Guests Online:
149

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