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.

 

HIDE FRONTPAGE MODULES IN VIRTUEMART PAGES

Re: HIDE FRONTPAGE MODULES IN VIRTUEMART PAGES

Hi Stephen,

Thanks very much for the post, i have changed the line, but the modul is not getting displayed - probably because of its position.

Is it possible to have the module on the frontpage at the top, and on the flypage under the product details?

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

Re: HIDE FRONTPAGE MODULES IN VIRTUEMART PAGES

My site:
www.infanttoddlerclothing.com

Thanks very much
Best regards
Patrik

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

Re: HIDE FRONTPAGE MODULES IN VIRTUEMART PAGES

Patrik,

If you want to have the module showing in different module positions on different pages, then you need to use a different MetaMod in each module position.

It sounds like you're not completely sure what's showing up where. Try turning on the debug mode in MetaMod (even briefly) and see if that gives you any indication what's going on. If you don't see any debug output on a page where you think it should be showing, then the MetaMod itself is either in a non-existent module position, or perhaps is not assigned to the page you thought it was.

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

Re: HIDE FRONTPAGE MODULES IN VIRTUEMART PAGES

I am trying to show module 166 only on the home page and not page 2, 3, etc. of the home page's blog (http://scnylab.org/joomla is the test site and module 166 is the photo collage banner at the top). I deleted module 166's "promo" position and assigned it to a MetaMod instead with the PHP instruction, "return 166;". The result is what you see -- the module on every page of the blog. I tried using "if ($option == "com_content" and $view == "frontpage") return 166;" instead but the module doesn't show up at all -- I'm guessing because "frontpage" has to be defined. How do I do that?

I also tried "if ( $core_genius->check("pagetype = frontpage") ) return 166;" but that did not work either.

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

Re: HIDE FRONTPAGE MODULES IN VIRTUEMART PAGES

Hi Pat,

I see that your site is running Joomla 3.1. Some of the PHP rules are a little different on later versions of Joomla. The concept of "front page" is also a little different since Joomla 1.5 – it used to be that most sites used the standard "front page" component for their front page, but these days it's easier to change than it used to be (I'm glad!) so there are different techniques.

Looking at the page, I see there are several things to watch for:

1 - the pagination (which is what you were asking about)
2 - what happens when you click on any of the article titles to "read more". Do you want the module to be hidden or shown on these pages?

What I'd suggest is this:
1 - allocate the MetaMod to only the "front page" via the menu associations. That will filter out most of the pages you DON'T want mod 166 to show on.

2 - use the following PHP to prevent the module from appearing on any of the paginated pages:

if (JRequest::getInt("page",0) == 0) return 166;

3 - you may also need to detect whether you are on the front page blog view, or on one of the articles linked from the front page. Write back if this is a problem and I'll show you what to do.

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

Board Info

Board Stats:
 
Total Topics:
1704
Total Polls:
6
Total Posts:
5973
Dormant:
User Info:
 
Total Users:
8414
Newest User:
gutsha3101
Members Online:
0
Guests Online:
221

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