Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.


mikel2004
Beginner Modder
ranks
useravatar
User Info

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

Administrator has disabled public posting
metamodguy
useravatar
User Info

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

Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 3107  Total Topics: 1196  Total Polls: 7  Total Posts: 4454  Total Posts Today: 1
User Info:   Newest User :  gobl3t   Members Online: 2   Guests Online: 62
Online 
calinccalinc
Topic
New
Locked
Topic
New
Locked
Sticky
Active
New/Active
Sticky
Active
New/Active
New/Closed
New Sticky
Closed/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky Active Locked
Active/Sticky
Sticky/Locked
Sticky/Active/Locked