Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » First session metamod 1 - Second...
First session metamod 1 - Second Session metamod2
First session metamod 1 - Second Session metamod2
At first: I bought the MetaMod Pro and it realy rocks Now to my problem:
When an unregistered user comes to my website it shows a module for signing up/facebook login (which is only visible to unregistered users).
What I want to achieve:
If the user stays on the page and navigates to subsites I want to show another module (smaller register button) at the same position.
How can I achieve that?
Thanks in advance for any help!
Best Regards
Thomas
Re: First session metamod 1 - Second Session metamod2
Hi Thomas,
I'm glad you like it
I assume that by "subsites" you mean if the user navigates to other pages on your site?
If so, then I think you want to simply show 1 module the first time they arrive on your site, and a second module replaces that one on every subsequent page view. Correct?
This page has something like what you are asking for:
http://www.metamodpro.com/support/recip … er-session
Is that what you are after?
Cheers,
Stephen
Re: First session metamod 1 - Second Session metamod2
Hello Stephen,
thank you for the reply I saw that already but was not able to figure out how to assign more modules for the first and next views. I don't know the syntax. I d like to to something like that
Code:
session_start();
/* set a different "instance name" for each module that you want to show only once */
$instance_name = "shown_module_1";
if (!isset($_SESSION[$instance_name]) ||
$_SESSION[$instance_name] == false) {
$_SESSION[$instance_name] = true;
/* customise "101" to your own module number.
* This is the one that gets shown just once per session.
*/
return 117;
return 220;
}
/* customise "102" to the module you want to display on the 2nd, 3rd... showing.
* You can leave out the following line entirely if you don't want to display
* a module after the first showing.
*/
return 230;
return 231;
How can I do that then it would fit my needs
EDIT: Ok, I found it. Is has to be return "117,220"
Re: First session metamod 1 - Second Session metamod2
Yes, you got it
You can return multiple modules in one go, by putting them in quotes e.g. return "117,120".
You can also put the "target modules" into a module position of their own, (e.g. I like to use "right-metamod" for the right position). Then, you can return the name of that module position.
The beauty of that is that then it's easy to add or subtract modules from that module position at a later date, and you don't need to keep going back to edit the MetaMod.
e.g. return "right-metamod";
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » First session metamod 1 - Second...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7624
- Newest User:
- borger3298
- Members Online:
- 0
- Guests Online:
- 172
- 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