Hi People,
i have a little problem with my news Module in CMSMS 2.1.6 . We use the CGContentUtils 2.2.2 to add a checkbox in our site manager to display or not the news. The news container in the front end has a brown background. Now if our customer leaves the checkbox checked in the site manager 'news tab' and no news article is published we have a small brown bar in our front end.
For us as a webdesign company it's no problem because we know that the checkbox is there since we have it in every of our websites. But our customer will maybe forget about it in some time.
Is there any solution for this? Or did someone maybe already had this problem?
News Module doesn't hide completly when it's ot checked
- paulbaker
- Dev Team Member
- Posts: 1465
- Joined: Sat Apr 18, 2009 10:09 pm
- Location: Maidenhead, UK
- Contact:
Re: News Module doesn't hide completly when it's ot checked
You should be able to resolve this with a change to the template - post the template which shows/hides the news depending on the state of your checkbox. Someone will be along with the right modifications.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation
CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
https://docs.cmsmadesimple.org/troubles ... nformation
CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
Re: News Module doesn't hide completly when it's ot checked
Here are two screenshots of everything i have to display/not display the news container.
Hope someone can help me.
That's all i have written in my main Template for the news container!
Hope someone can help me.
That's all i have written in my main Template for the news container!
Re: News Module doesn't hide completly when it's ot checked
Some questions and hints:
Why don't you use the the parameters from the {news number=...} tag you actually show a few lines later? Now you call {news} twice and it's possible you DO find an article in the first call you use to check if there's any news while the actual {News number=... category="General"...} returns NO items because of the extra constraints (category).
Why don't you put the {if empty($news_there)} statement not around the whole <div id="news-container">?
Check if the DEFAULT news summary template (or if you're going to follow my advice, the engelback-newsuebersicht template) is returning NOTHING if no items are found. The function empty(...) will return false if a non-empty string is returned. A string of one space (' ') is non-empty too.
Code: Select all
{news assign='news_there'}
Why don't you put the {if empty($news_there)} statement not around the whole <div id="news-container">?
Check if the DEFAULT news summary template (or if you're going to follow my advice, the engelback-newsuebersicht template) is returning NOTHING if no items are found. The function empty(...) will return false if a non-empty string is returned. A string of one space (' ') is non-empty too.