Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Hiding modules when published but...
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
22-Jan-10 13:39:20
Re: Hiding modules when published but have no items
Oh, that sounds a bit hard to do
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
- Index
- » MetaMod
- » MetaMod General Support
- » Hiding modules when published but...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7627
- Newest User:
- rudys68879
- Members Online:
- 0
- Guests Online:
- 157
- 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