Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » [solved] load more then 1 module in...
[solved] load more then 1 module in virtuemart
[solved] load more then 1 module in virtuemart
Hi.
i try to load more then 1 module in virtuemart front page, the first module load OK but the seconed fail, this is my text
$vm = JomGenius("virtuemart"); // need this at the start of every rule
if ( $vm->check( "pagetype = frontpage" ) ) return XXX;
/* replace XXX with the module id or position you want
* to display <em>only</em> on the front page of VirtueMart
*/$vm = JomGenius("virtuemart"); // need this at the start of every rule
if ( $vm->check( "pagetype = frontpage" ) ) return yyy;
/* replace XXX with the module id or position you want
* to display <em>only</em> on the front page of VirtueMart
*/
what is right way to wright it ?
thank you
Re: [solved] load more then 1 module in virtuemart
Hi,
if you want to return more than one module in the same MetaMod, you need to return both id numbers in the same "return" statement, either by making a comma-separated list, or making an array that you return.
e.g.
return "123, 45,77";
or:
$r = array();
$r[] = 123;
$r[] = 45;
$r[] = 77;
return $r;
The 1st option is useful if the 2 modules always go together (under the same circumstances).
The 2nd option is useful if you need to construct the list from a series of PHP operations then return the list at the end.
Hope that helps,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » [solved] load more then 1 module in...
Board Info
- Board Stats:
- Total Topics:
- 1699
- Total Polls:
- 6
- Total Posts:
- 5967
- Total Posts Today:
- 2
- User Info:
- Total Users:
- 8025
- Newest User:
- chavez1304
- Members Online:
- 2
- Guests Online:
- 134
- Online:
- chavez1304, dianegreen9
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked