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.

 

Place different Modules on different articles in Category-Blog

Place different Modules on different articles in Category-Blog

Hi,
I use the newest Version of MetaMod and Joomla 1.64.
I want to place 3 different Modules on different postions on different articles in Category-Blog.

Please, can you tell me how?

regards
Marge

Eisele
Beginner Modder
ranks
useravatar
Offline
11 Posts
Administrator has disabled public posting

Re: Place different Modules on different articles in Category-Blog

Hi Marge,

Do you mean that you want to display 1 module in 1 position on 1 article page, and another module in a different position on another article page, and a 3rd module in yet another position on yet another article page?

If so, I'd do this:

1 - create the 3 different "target" modules that you're going to use on the article pages. Keep each of them assigned to "none" menu items.

2 - create 3 MetaMods, 1 in each position that you want to display one of the target modules.

3 - in each MetaMod, do the following:

if ($content_genius->check("article_id = XXX")) return YYY;
// replace XXX with the article id that you want to put the
// module onto, and YYY with the id of the module you want
// to put there.

Obviously, for each MetaMod you'll use a different value for XXX and YYY.

Lastly, don't forget to make the MetaMod published, and set to ALL menu items.

Hope that's what you were after,
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
3314 Posts
User info in posts
Administrator has disabled public posting

Re: Place different Modules on different articles in Category-Blog

Hi Stephen,
I want publish 3 different module in 3 modulpositions on one article in blog layout. In the same category blog I want publish 3 other modules on another article and again 3 different module on an other artikel and again ...

This if ($content_genius->check("article_id = XXX")) return YYY;
works, but I think I make something wrong in my Configuration, because I see the modul on more than one page.

Here my steps:
I make my target module
I assign it to all menus and unpublish ist.
I make a metamod module
I choose the correct position
I write in the quick id-field the id of the target module and use your code
if ($content_genius->check("article_id = XXX")) return YYY;

I assign the metamod to the menuitem of the category and publish.

This I have done with 2 modules. I want different pictures on different articles in one category.
Now I see both module on every page of this category.

What ist wrong?

If i have the solution for this problem it would be nice to put 3 module on one page with one metamod.

regards
Marge

Eisele
Beginner Modder
ranks
useravatar
Offline
11 Posts
Administrator has disabled public posting

Re: Place different Modules on different articles in Category-Blog

Now i have set in target module the menu assigment to none and in metamod to all.
I have the modules on every page now.
regards
Marge

Eisele
Beginner Modder
ranks
useravatar
Offline
11 Posts
Administrator has disabled public posting

Re: Place different Modules on different articles in Category-Blog

Hi Marge,

It looks like you're getting closer. When you say you have the modules on every page, do you mean that it's every page where they are SUPPOSED to be, or absolutely every page (and this is not what you want)?

Let me just go over the checklist again:

1 - (done) target module set to "none"
2 - (done) MetaMod set to "all"
3 - don't put anything into the "quick module id or position include". Leave it blank if you're using a PHP rule
4 - use the PHP from above.
5 - turn off the title display in the MetaMod (title: off).
6 - finally, turn off debug mode. With debug mode on you'll see some output on every page where the MetaMod is assigned (all pages, in your case), although the target module should only appear on pages where the PHP rule decides they should be. Also the target module will appear on all pages if the target module id has been entered into the "quick module id or position include" box.

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

Re: Place different Modules on different articles in Category-Blog

Hi Stephen

I am using J2.5.7  metamodpro 3.11

I want a module to appear on a certain article page of a category blog.

If I use this code I get a blank front end page when I go to the article from the list page.
if ($content_genius->check("article_id = 316") ) return 473;
Those are the correct article and the correct target module IDs
I have also tried creating a new article with just the word test on it with the same result.


1 - (done) target module menu items set to "none"
2 - (done) MetaMod set to "all"
3 - (Blank)don't put anything into the "quick module id or position include". Leave it blank if you're using a PHP rule

5 - (done)turn off the title display in the MetaMod (title: off).
6 - (off) finally, turn off debug mode.
I also have put my metamod module into a known position in the template.

This code shows the module on the category blog page successfully (not want I want, but shows the target mod works).
if ( $content_genius->check("pagetype = categoryblog")
    and $content_genius->check("category_id = 179") ) return 473;

I have tried as many variations of all the related recipes that I can think of, but no joy yet...
ANy ideas?

The site is not live yet so I do not want to put the URL in the forum.

suzannemmp
Beginner Modder
ranks
useravatar
Offline
6 Posts
Administrator has disabled public posting

Re: Place different Modules on different articles in Category-Blog

Hi Suzanne,

I just checked the PHP snippet you said caused the blank page:

if ($content_genius->check("article_id = 316") ) return 473;

In itself this seems to work fine on my setup -- can you please check that there's absolutely nothing else in the PHP box that might be causing a syntax error that might cause the blank page?

Also, with blank page problems try increasing the error reporting level (global preferences in Joomla) to maximum then retry. You may find there's more of an error message generated that may help to pinpoint the problem.

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

Re: Place different Modules on different articles in Category-Blog

Hi Stephen

There was nothing else in the php box.

Looking at the issue afresh I decided to try a different target module in the same position using metamod. It worked fine. I then tried my original target module on an article that did not need metamod to make it show.

I got the same blank page and realised the issue was with my target module not metamodpro (or the code I was putting in the metamodpro php box).

(For anyone with a similar issue I was trying to use a captify content extension to display images. Although this is listed as for Joomla 2.5, the company who produce it (Joomlabamboo) now recommend using Zen tools for Joomla 2.5 instead - which does loads of useful stuff).

Using Zen tools with metamodpro I am able to put modules either on the category blog list pages or on the articles which lead off them (and then choose to not have them show on the category blog list pages)

Thanks for your help in getting closer to the issue.
Suzanne

suzannemmp
Beginner Modder
ranks
useravatar
Offline
6 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1691
Total Polls:
6
Total Posts:
5912
Total Posts Today:
6
User Info:
 
Total Users:
11529
Newest User:
jame380003
Members Online:
1
Guests Online:
157

Online: 
jame380003

Forum Legend:

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