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.

 

Catching module output and formating

Catching module output and formating

Hi,

I have an issue where i am using multiple templates within one site. I have had a problem with Joomla Tags where, when clicking on the tags link, it formated the resulting page using the sites default template and not the section I was in. I have fixed this with MetaTemplate so if the URL contains "option=com_tag&task=tag" it formats it with the correct template.

The issue i have is that my template also includes other modules, like the copyright, which do not get called on the new page and the defaults are displayed. Is there anyway to call these also in the success section.

I am new to Joomla and PHP so any assistance would be welcomed.

Regards

Hippofrogsry

hippofrogsry
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Catching module output and formating

Hi Hippofrogsry,

I've just been taking a look through your site and now I can see what you mean!

The underlying issue is that the links from the "tags" component don't have an "Itemid" as part of the URL. The Itemid is another name for the id of the menu item that the target page is on. Bear with me - this is a little complicated.

So when you create a menu item for a page, there's a specific ID for it. That Itemid needs to be in the URL every time the URL is called, so that Joomla can retrieve important information about the page.

One of those important bits of information is which modules should be attached to that page. Remember when you assign modules to a page, you can pick which pages (menu items) that module should be attached to? This is basically just assigning modules to particular Itemids. So whenever a page with Itemid 100 is displayed, it will get all modules set to "all" pages, and all modules which were attached to the particular menu item that had Itemid 100.

Ok, that's the gory details. Now, the question is, what to do about your situation?

The core issue is that com_tag is not adding any Itemid onto the links that it creates to the tag pages.

This is discussed on their forums:

http://www.joomlatags.org/forum/view-po … -link.html

... and apparently is on the "to do" list but isn't getting done fast.

There is a way around it though, using my other product, MetaMod.

You can try this out with the free version of MetaMod and it will probably work just fine.

Basically, you would set up your modules to be included by MetaMod any time you're on a page with an option of "com_tag".

You'll need to start with the Quick Start guide: http://www.metamodpro.com/metamod/quick-start

Then the MetaMod rule you would use would be:

if ($option == "com_tag") return XXX;
// replace XXX with the module id of the module to show on any com_tag pages.

I hope that gets you started. Ask about it on the MetaMod forum if you want more help with that part.

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

Re: Catching module output and formating

Hi Stephen,

Thanks for the detail, i will go and have a more indepth look at MetaMod and try what you have suggested.

I may have to post in the other forum as if I look just for com_tag i may end up with the wrong menus in the other part of the site? I assume there is a way I can specify the page which the user has selected the tag link on so if i have tags in template "A" they appear with template "A" modules and not template "B's".

Thanks for your help.

Hippofrogsry

hippofrogsry
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Catching module output and formating

Hi Hippofrogsry,

It's really pretty difficult to know what to suggest about the com_tag URLs, if they could appear on both "sides" of your site, and don't have any other identifying parameters.

You might need to bug the com_tag programmers to do something about that, or try to hire someone else to fix it.

You're asking however "can I base modules on which template has been selected". The answer is Yes - with MetaMod you can do that. So as long as you had enough info to change the template, then you can make the modules follow suit.

There's a recipe for that on http://www.metamodpro.com/metamod/recip … a-template

Does that sound like it would work for you?

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

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10796
Newest User:
mokao3
Members Online:
0
Guests Online:
88

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