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.

 

Problem with displaying a module on some pages

Problem with displaying a module on some pages

I tried to follow the instructions and hope I have not made ​​mistakes, but I have a problem, I loaded the map of ohanah (http://app.ohanah.com/) visible in a menu item
joomla. enthous. it / index.php/what-we-do-now/calendar-events

the problem is when I enter into the individual component events ohanah
joomla . enthous . it/index.php/cosa-facciamo-oggi/agenda-eventi/creattivando

thanks a lot

stefano

the domain is a test site

Edited By: riga75
02-May-13 09:45:33

riga75
Beginner Modder
ranks
useravatar
Offline
10 Posts
Administrator has disabled public posting

Re: Problem with displaying a module on some pages

Hi riga75,

you can almost certainly detect the different types of pages in ohanah with a little help from MetaMod's "advanced debug" mode. Can you turn that on (temporarily) then view the 2 pages: the original list page, and the detail page? Then copy and paste the output from MetaMod on the 2 pages and post it to the forum here? From that it's usually fairly obvious how to use the suggested code to distinguish between the 2 types of pages.

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

Re: Problem with displaying a module on some pages

Hi Stephen,

sxcuse my ignorance but how do I do this:
Can you turn on That (temporarily) then view the 2 pages: the original list page, and the detail page?

thanks a lot

stefano

riga75
Beginner Modder
ranks
useravatar
Offline
10 Posts
Administrator has disabled public posting

Re: Problem with displaying a module on some pages

Ok, in MetaMod you have an option called "Debug: off, on, advanced". Creat a MetaMod and set it to display in a valid module position, and on ALL pages. Set it to "debug: advanced", then view the 2 pages mentioned above, and take a copy of the output from the front end. After you have done this you can unpublish or delete that MetaMod because you don't need that info to be shown to the public!

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

Re: Problem with displaying a module on some pages

ok the home of ohanah:
Page Identification
The PHP code below may be used to help MetaMod to identify the exact page that you are viewing. For help using this feature, please click here.
if (
$option == 'com_ohanah'
and $view == 'events'
and $Itemid == '459'
) return XXX; /* replace XXX with the module ID or position to display */
MetaMod debug info:
Module ID: 211
$option: com_ohanah
$view: events
$id:
$Itemid: 459
$timezone: UTC
$language: it-it
$language_code: it
$language_region: it
Including modules: Nessuno

and the internal page of ohanah
Page Identification
The PHP code below may be used to help MetaMod to identify the exact page that you are viewing. For help using this feature, please click here.
if (
$option == 'com_ohanah'
and $view == 'event'
and $id == '3'
and $Itemid == '459'
and $jinput->get('layout') == 'default' /*!*/
) return XXX; /* replace XXX with the module ID or position to display */
Note: lines starting with "and" and ending with /*!*/ contain rules that may be optional. You may wish to leave them out.
MetaMod debug info:
Module ID: 211
$option: com_ohanah
$view: event
$id: 3
$Itemid: 459
$timezone: UTC
$language: it-it
$language_code: it
$language_region: it
Including modules: Nessuno

riga75
Beginner Modder
ranks
useravatar
Offline
10 Posts
Administrator has disabled public posting

Re: Problem with displaying a module on some pages

ok, I have forgotten if you want the modules to only appear on the inner page, or NOT on the inner page. So here's how to do both things:

To make the module appear only on the event (inner) pages:

Code:

if ( 

  $option == 'com_ohanah'
  and $view == 'event'
) return XXX;

To make the module appear only on the main ohanah page and not the event pages:

Code:

if ( 

$option == 'com_ohanah'
and $view == 'events'
) return XXX;

Remember to replace XXX with the module id of the module you want to control.

Hope that helps,
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
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10796
Newest User:
mokao3
Members Online:
0
Guests Online:
117

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