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 only on the index page

MetaMod only on the index page

Hello,
Can you please help me ? I'm trying to display a specific module only on the mainpage of my site (/index.php),and another module on the rest of the pages from the com_content/view frontpage.
Basically:
now i have
if ($option == 'com_content' and $view == 'featured') return 174;

i tried on index:

if ($option == 'com_content' and $view == 'featured' and $limitstart == '0' and $view == 'featured') return 174;

and on page-2 :

if ($option == 'com_content' and $view == 'featured' and $limitstart == '5' and $view == 'featured') return 171;

it doesn't display the module at all

can you please give me the right synthax ?

Thank you in advance !
Best Regards,
Stefan

Edited By: sstanescu
04-Oct-13 11:00:35

sstanescu
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: MetaMod only on the index page

Hi Stefan,

in MetaMod, some variables are prepopulated, like $option, $view and $Itemid. Others (like limitstart) are not. So you may need to combine things like this:

if ($option == 'com_content' and $view == 'featured' and JRequest::getVar("limitstart") == '0' and $view == 'featured') return 174;

Also, try turning on MetaMod's "advanced debug" mode and viewing the pages in question - it should spit out some PHP code similar to that above, which may help further.

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

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5909
Total Posts Today:
1
User Info:
 
Total Users:
10075
Newest User:
rsker57
Members Online:
0
Guests Online:
210

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