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.

 

Category recipe not working again!

Category recipe not working again!

Hi Steve,

I don't know what I am doing wrong this time, but my module is not appearing as it should when I use this recipe

if ( $content_genius->check("category_id = 48" ) ) return 32;


I put this so that module 32 would appear in category 49 (Artistic Development, top menu Lessons>Artistic Development).

It won't appear.

If you need my log in again, let me know, thanks!

Jamie

jamieandreas
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: Category recipe not working again!

Hi Jamie,

the reason is that the menu item you are using for "artistic development" is not linking to an article, exactly... for some reason you have set it up to point to a URL.

e.g. http://yourdomain/lessons/48-artistic-development

This means that when you assigned a module to that menu item, it doesn't work (for deep and complex reasons you probably don't want to know about).

In any case, since you're using the content_genius code for detecting certain category ids, is there any reason you need to use the menu item selector at all? Couldn't you just set that to "all", then let the category detection take care of showing the module when it's in the right categories? Then it would work site-wide.

Last thing: you're constructing rules like this:

if ( $content_genius->check("category_id = 52" ) ) return 32;
if ( $content_genius->check("category_id = 41" ) ) return 32;
if ( $content_genius->check("category_id = 44" ) ) return 32;
if ( $content_genius->check("category_id = 49" ) ) return 32;
if ( $content_genius->check("category_id = 48" ) ) return 32;


That's fine, but you can do it more simply. You can just put a list of category ids inside a single rule like this:


if ( $content_genius->check("category_id = 52,41,44,49,48" ) ) return 32;

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

Re: Category recipe not working again!

That's great Stephen, thanks! I knew there were some basic things I was not understanding.

jamieandreas
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1685
Total Polls:
6
Total Posts:
5912
Total Posts Today:
4
User Info:
 
Total Users:
11510
Newest User:
david5871
Members Online:
1
Guests Online:
197

Online: 
david5871

Forum Legend:

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