Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » MetaMod only on the index page
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
04-Oct-13 11:00:35
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
- Index
- » MetaMod
- » MetaMod General Support
- » MetaMod only on the index page
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7645
- Newest User:
- foocd90
- Members Online:
- 2
- Guests Online:
- 156
- Online:
- melton7386, foocd90
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked