Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.



Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.


Hiding modules when published but have no items

Hiding modules when published but have no items

I use joomla 1.5.15 and metamod 2.2c
I wish to hide modules published when no item or item to display are less than 1.
modules are: mod_list_article (id=102) (metamod id=139)
and: mod_related_anything (id=103) (metamod id=139)

Thanks a lot

Edited By: mikel2004
22-Jan-10 12:39:20

Beginner Modder
7 Posts
Administrator has disabled public posting

Re: Hiding modules when published but have no items

Oh, that sounds a bit hard to do sad
So you're saying that you want to render the mod_list_article, but only display it if it has some articles to display? and the same for mod_related_anything?

MetaMod doesn't actually give you the ability to render modules in advance and examine their contents. So on the face of it, it doesn't look hopeful.

However, can I ask what mod_list_article actually does? Does it just list articles in a specific category? Or some other criteria like that? If so, then the MetaMod could basically do the same lookup that mod_list_article does, then decide to show/hide the mod_list_article module based on that.

I suppose theoretically we could do the same thing for mod_related_anything, but it might be a bit harder to get at the same SQL query that it's doing, in order to replicate it.

If you can dig around and find the exact SQL that's being run for each of these modules, then post it here and I'll show you how to use that info in MetaMod.


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

3314 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
Total Topics:
Total Polls:
Total Posts:
Total Posts Today:
User Info:
Total Users:
Newest User:
toko solo
Members Online:
Guests Online:

There are no members online

Forum Legend:

 New Sticky