For a project I'm working on, I've run into the following problem
I have a module that loads articles based on category. I need these articles to be loaded in another article with {loadposition}, where an module will be loaded that loads the articles for that category.
For each said category I have an title and some text, and after that the module with the articles will be loaded. However, when there are no articles in the category, I'll get the title and text but no related articles.
What I'd want, is when there are no articles in a category and thus no articles will be shown, I also want to hide the title and text from that category.
I have tried to use the countModules function, but that won't work since the module for loading the articles will always be active, even if there are no articles in that category at all. Is there any way I could achieve this? Maybe some way to see if there actually are any articles in the category, and based on that show or hide the title and text?
Any help would be greatly appreciated