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.

 

Modules only on the front page

Modules only on the front page

Hello,

I am using...
Joomla 2.5.8
Virtuemart 2.0.18
MetaMod Pro 3.13b

I am trying to get some modules from a Joomla Monster template to show only on the front page. The template is built showing modules on the front page with nothing in the main content. The problem is during the checkout process, if there is an error or when you reach the thank you page. It shows the content on the front page with all the front page modules.

I found this recipe
if ( $core_genius->check( "pagetype = homepage" ) ) return "167";

and I tried this one but I can't get it to work.
$menu =& JSite::getMenu(); if ($menu->getActive() == $menu->getDefault()) return 167;

If I could get these modules to only show on the frontpage, I am hoping they won't show up on the Virtuemart pages.

What is the best way to achieve this?

Here is a link showing the modules with the Virtumart Thank You at the bottom.
http://bigskyfamilyfoods.com/index.php/ … m?Itemid=0

Thanks, Chuck

possum
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: Modules only on the front page

Hi Chuck,

This is a classic VM problem, where the checkout/thankyou pages lose their Itemid and Joomla treats them like the front page in terms of what modules they get.

I would suggest that you put a MetaMod on each front page module that checks to ensure that the page is NOT a VM page before it displays the module? So, assign the MetaMod to the front page menu item, but then the MetaMod does further checking to ensure it's NOT on a VM page before it displays its target module(s).

I would put all the modules that are destined for the front page only, into a module position like "left-front-metamod" instead of "left". Then you put a MetaMod into the "left" position with the following code:

if ($option != "com_virtuemart") return "left-front-metamod";

This will then display all the modules from the left-front-metamod inside the "left" position but ONLY when it's not a VM page.

Make sense?

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

Re: Modules only on the front page

Hi Stephen,

The problem is there are other pages of the website that I don't want the modules on. The way this template is designed and laid out, it has 4 fancy modules on the front page. But they are only on the front page.

How can I have those modules only display on the front page and not on virtuemart pages or other pages of the website.

Thanks, Chuck

possum
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: Modules only on the front page

Yes, that's exactly what I am describing. So you assign the MetaMod to the menu item for the front page (as you used to do for those 4 fancy modules), but the MetaMod does the extra check to ensure the page is NOT a VM page before including the modules. Hope that makes sense.

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

Re: Modules only on the front page

Hi Stephen,

So not only will the modules not be on the VM pages but also other joomla pages, like the About Us, Pricing, FAQ, How to Order, and Contact Us.

Thanks, Chuck

http://bigskyfamilyfoods.com/

possum
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: Modules only on the front page

Hi Stephen,

I have it working!

Thank you so much for the tech support!

You rock, Chuck

possum
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: Modules only on the front page

Hi, lovely site Chuck! Very pleased to be able to help you with it.

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

Board Info

Board Stats:
 
Total Topics:
1684
Total Polls:
6
Total Posts:
5940
Posts this week:
1
User Info:
 
Total Users:
5174
Newest User:
frashaomran
Members Online:
0
Guests Online:
106

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