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.

 

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

mikel2004
Beginner Modder
ranks
useravatar
Offline
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.

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:
1680
Total Polls:
6
Total Posts:
5914
Total Posts Today:
1
User Info:
 
Total Users:
10831
Newest User:
bluesky1
Members Online:
0
Guests Online:
139

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