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.

 

Using metamod in mosets tree detailed listing

Using metamod in mosets tree detailed listing

Hello Stephen,

I use the latest version of mosets tree. I followed your instructions on how to use metamod in articles. The following codes were generated:

if (
$option == 'com_mtree'
and $Itemid == '103'
and JRequest::getVar('link_id') == '4' /*!*/
and JRequest::getVar('task') == 'viewlink' /*!*/
) return XXX; /* replace XXX with the module ID or position to display */

When I change the link id to that of the particular page I want place the module, it works. However I have the following problems/questions:

1. I noticed that any time I visit the detailed pages the code remains on the page and this makes the page messy.

2. If I intend to use this on more than one listings, do I make a copy of metamod and insert the relevant codes for the particular page?

3. When I tried that it worked, but again I had the problem of having two codes appear on my detailed page in the front end, which makes the page messy.

4.Is there a way to use  metamod on different listing without having to create another copy of metamod?

5. How can I get rid of the codes that appear in the detailed listing and just have my picture appear, so the page can be neat?

Here is a link to one of such pages. I inserted the header on the footer just for a demo.

http://nigerianbusinesslisting.com/inde … tic-center

Any suggestions/help you can render is highly appreciated.

Thanks.

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

Re: Using metamod in mosets tree detailed listing

Hi nissilaws,

Can I just ask what you mean by "code"? Do you mean a blank module appearing that's "empty"? If so, there are 2 parts to the solution:

1 - Pro version (I'll e-mail you about that)
2 - you can stack the PHP code into just 1 MetaMod, so that it can act as a switch to determine which other module(s) it wants to include. So you don't need to have multiple MetaMods in order to switch between a dozen or more modules to place into the same location.

So you could do something like this:


if (
  $option == 'com_mtree'
  and $Itemid == '103'
  and JRequest::getVar('task') == 'viewlink' ) {
 
    $link_id =  JRequest::getVar('link_id');
    if ($link_id== '4')  return XXX; /* replace XXX with the module ID or position to display */
    if ($link_id== '5')  return YYY; /* replace YYY with the module ID or position to display */
    if ($link_id== '6')  return ZZZ; /* replace ZZZ with the module ID or position to display */
    // add more here.
}

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

Re: Using metamod in mosets tree detailed listing

I'm having a little trouble with this exact post.

If you go to this page - http://208.92.166.18/~library/index.php … Itemid=598

You'll see in the url the link_id is 1 (I have 1-26 as listings in a category), but in the debug info there is no way to separate them as different pages as you can see if you go to the page.

Would there be a reason for this?  I have tried this

if (
  $option == 'com_mtree'
  and $Itemid == '598'
  and JRequest::getVar('task') == 'viewlink' ) {
    $link_id =  JRequest::getVar('link_id');
    if ($link_id== '2')  return 188;
    if ($link_id== '5')  return 187; 
    if ($link_id== '6')  return 186;
}

But to no avail.  Any help would be appreciated!

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

Re: Using metamod in mosets tree detailed listing

Hi Storyboard,

well, what you have written there should work, at least for showing a different module for each of the library pages in that menu on the left.

Please check:
1 - that the MetaMod is published, set to an appropriate module position, and set to one or more pages (menu items), at least including the one where Itemid is 598
2 - that the target modules (e.g. 186, 187, 188) are either set to "menu items: none" or unpublished so that they don't show up unless/until MetaMod includes them.


Any luck?
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
3329 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1698
Total Polls:
6
Total Posts:
5944
Dormant:
User Info:
 
Total Users:
5595
Newest User:
gary099231
Members Online:
0
Guests Online:
195

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