Search
Other Sourcerer questions
Forum

Check if module contains content in article

Ronny Buelund's Avatar Ronny Buelund
I have an article where I show several modules byt the use of {loadmoduleid xxx}

I would like to use sourcerer to only show some certain html in the article when the loaded module contains something, and if it is empty it should not show the html. Can that be done ??
Peter van Westen's Avatar Peter van Westen ADMIN
That's not so easy.
Is this a Custom Html module or some other type?

You would first need to render the module, then do the check and conditionally output it based on that.

Can be done, but requires you to do quite some custom PHP.
Can't be simply done via the {loadmoduleid} tag.
Please post a rating at the Joomla! Extensions Directory
Ronny Buelund's Avatar Ronny Buelund
I found another way. The module is Raxo all pro and it shows article images from articles in a certain category. So now I just check the database to see if that certain catgeori is empty. If it is, I do not show anything, and if it is not I show the module and its header.
Peter van Westen's Avatar Peter van Westen ADMIN
Ok, great you found an easier way!
Please post a rating at the Joomla! Extensions Directory
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription