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.

 

Article only display - Problem (SOLVED)

Article only display - Problem (SOLVED)

SOLUTION:

I changed com_resource to com_content and now it works perfectly

___________               _________________           ___________________


I have been using the following recipe to display a module only in article:

if ( $option == 'com_resource'
  and $view == 'article'
) return 72;

I does turn off the module in other pages but doesn't display it in articles?

Enhanced debug shows:

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_content'
and $view == 'article'
and $id == '57:lowther'
and JRequest::getVar('catid') == '27:scotland'
and $Itemid == '34'
) return XXX; /* replace XXX with the module ID or position to display */
MetaMod debug info:
$option: com_content
$view: article
$id: 57:lowther
$Itemid: 34
$timezone: default
$language: en-us
$language_code: en
$language_region: us
Including modules:

I have used MetaMod for other modules and they worked first time.

I have checked that the module to be displayed is enabled and active for all menu items, module id is correct.

Any ideas of what I could be doing wrong?

Thanks

Gordon

Edited By: ruraldev
23-Jun-10 18:31:09

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

Re: Article only display - Problem (SOLVED)

Hi Gordon,

Thanks for letting me know about this. It suggests that the info on the Mighty Content recipe page is wrong with regards to detecting when you are on an article page. I'll check into this and edit the recipe.

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

Re: Article only display - Problem (SOLVED)

I checked MightyResources again - and you would need to check for com_resources if you are using MightyResources.

I guess that you're *not* using MightyResources, but accidentally used the wrong recipe. You're obviously using the right recipe now though.

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

Re: Article only display - Problem (SOLVED)

Hello im using this code and this dont work:

if ($option == "com_content" and $view == "article" and (int)$id == 144) return 147;

All that i want is show a module into a specific article
Please advise me

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

Re: Article only display - Problem (SOLVED)

I tried this too since that i want that a module appear into a specific article and either works:
// replace XXX with the id of the module to return
// replace AAA, BBB, CCC etc with the article ids to detect
$module_to_return = 147;
if ( $option == 'com_content'
  and $view == 'article'
) {
  $article_id = JRequest::getVar('article');
  if ( $article_id == 142
    or $article_id == 143
    or $article_id == 144
  ) return $module_to_return;
}

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

Re: Article only display - Problem (SOLVED)

Please metamodguy help me with some support

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

Re: Article only display - Problem (SOLVED)

Hi webssolutions,

sorry I got a little behind on support for a few days. I'm getting back to speed now.

I can't really tell what's going wrong from what you wrote - could you please give me a little more information about what happens or doesn't happen?

A quick check-list for you:
1 - is the MetaMod module published? (it needs to be)
2 - is the MetaMod module published in the module position that the target module is to appear in? (it needs to be)
3 - is the MetaMod module assigned to the correct menu items, or to "all"? I'd suggest keeping it on "all" in your case.
4 - turn on MetaMod debug mode and ensure that you see some debug output when you are on the article page that you want to target. If you can't see any debug output then the MetaMod is not set up right (see items 1-3).
5 - at the end of the MetaMod debug output you should see "Including modules: 147" if it succeeded, and "Including modules:" (with no module id) if the PHP rule failed to detect the page properly.

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

Board Info

Board Stats:
 
Total Topics:
1675
Total Polls:
6
Total Posts:
5917
Total Posts Today:
1
User Info:
 
Total Users:
11558
Newest User:
pitbull911
Members Online:
4
Guests Online:
224


Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked