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.

 

metamod not working at all

metamod not working at all

Hello,
I run a music website and under the "discography" category I have created different sub-categories. ie

discography > albums
discography > singles
discography > compilations
discography > megamixes.

Each article is in its own category, based on the above.

So basically what I want to do is show a module (custom html module) whenever any of the articles in the above categories is viewed.

I'm not sure if the recipe takes into account "sub-categories", but I've tried the recipe using the main category (discography ID=80), and then also another recipe with a bunch of its sub-categories (album ID=91, single ID=92, etc).
Either way, the recipes don't work.

What am I doing wrong?
   
www.parralox.com/discography

Joomla! version 2.5.22.
Metamod version MetaMod v3.10, 2012-07-23

The below recipe is just for ONE category (singles) but it doesn't work.

// show certain modules only on article pages where the article is in a certain category
if ( $content_genius->check("pagetype = article")
    and $content_genius->check("category_id = 92") ) return 205;

// 531=discography menu
// 205=discography module
//  80=discography category
//  91=category album
//  92=category singles
//  93=category compilations
//  94=category megamixes
//  95=category unofficial

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

Re: metamod not working at all

Hi John,

thanks for the descriptive and helpful post.

(1) Check that your overall setup is correct.
- MetaMod must be published
- MetaMod must be set to a valid module position
- MetaMod must be assigned to some or all pages (menu items).

You can test those 3 things by turning on MetaMod's Debug mode and ensure that you can see some output from MetaMod on the front end of the site. If you can't see anything, then check those 3 items again.

(2) Test to see if JomGenius is giving the same information that you are relying on. Try the following code in the PHP box and check the output on the front end.

echo "pagetype: " . $content_genius->info("pagetype") . "<br>" ;
echo "category id: " .  $content_genius->info("category_id")  . "<br>";

Do you get a page type of article and the category id you were expecting?

(3) since you are using a PHP recipe, ensure that you do not have anything in the "quick module position or id include" box in MetaMod.

(4) ensure that your target modules are either set to display on NO menu items, or are set to a non-existent module position, so they do not show up until MetaMod includes them.


Lastly, you asked about whether the recipe detects subcategories. The "category_id" keyword in JomGenius does not detect subcategories, but if you want to detect that a category or article is a descendent of a certain category then you can use the ancestor_category_ids keyword instead.

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

Board Info

Board Stats:
 
Total Topics:
1686
Total Polls:
6
Total Posts:
5933
Total Posts Today:
7
User Info:
 
Total Users:
4432
Newest User:
kinggambling14
Members Online:
0
Guests Online:
142

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