Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Category recipe not working again!
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
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
- Index
- » MetaMod
- » MetaMod General Support
- » Category recipe not working again!
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7634
- Newest User:
- boratuglu
- Members Online:
- 0
- Guests Online:
- 149
- 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