Keyword

don't show k2 content modul if no articles active

  • Oliver Pressmar
  • Oliver Pressmar's Avatar Topic Author
  • Offline
  • New Member
More
10 years 6 months ago #126950 by Oliver Pressmar
don't show k2 content modul if no articles active was created by Oliver Pressmar
Hello,

i have an news module which works with the k2 content module. The module show the articles from a news category. The customer has no access to the module administration.

So my problem is, if the customers disables the articles in the news category - the module with it headline "News" still shows on the website. What i want to achieve is, that if there is no active article the module should disappear from the website including the module title "News".

Is there any solution to get this working. I first thought of making a css-override "display:none" which activates if the article selection has no active item.

I really would appreciate the help.
Oliver

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #126951 by Lefteris
Hi. You cannot hide a module title in Joomla! depending on output. Modules in Joomla! have an option for showing/hiding title. What you can do is to set it to hide the module title and move the title inside the module output. If you do this you will be able to control the whole module output depending on results. If you use mod_k2_content this is done automatically.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Oliver Pressmar
  • Oliver Pressmar's Avatar Topic Author
  • Offline
  • New Member
More
10 years 6 months ago #126952 by Oliver Pressmar
Replied by Oliver Pressmar on topic Re: don't show k2 content modul if no articles active
Hi,

yes i know the option to "Don't show the module title. This is in my opionion just no perfect, because the module with its background, borders, padding and so on. Still stays in the layout. Maybe this could be an option for further releases.

kindest regards
oli

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #126953 by Lefteris
This is something that has to do with the way Joomla! renders modules, not K2. As i already said if you hide the title and use the mod_k2_content , then no output at all is printed if no items are found.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum