• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: News Module doesn't hide completly when it's ot checked
PostPosted: Thu Oct 05, 2017 6:16 am 
Offline
New Member
New Member

Joined: Wed Jun 28, 2017 9:19 am
Posts: 6
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?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: News Module doesn't hide completly when it's ot checked
PostPosted: Thu Oct 05, 2017 2:03 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Sat Apr 18, 2009 10:09 pm
Posts: 1425
Location: Maidenhead, UK
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


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: News Module doesn't hide completly when it's ot checked
PostPosted: Wed Oct 11, 2017 6:46 am 
Offline
New Member
New Member

Joined: Wed Jun 28, 2017 9:19 am
Posts: 6
Here are two screenshots of everything i have to display/not display the news container.
Hope someone can help me.

Attachment:
engelbach-tmp.JPG
engelbach-tmp.JPG [ 236.84 KiB | Viewed 573 times ]



Attachment:
engelbach-tmp-2.JPG
engelbach-tmp-2.JPG [ 148 KiB | Viewed 573 times ]


That's all i have written in my main Template for the news container!


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: News Module doesn't hide completly when it's ot checked
PostPosted: Wed Oct 11, 2017 7:49 pm 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3031
Location: The Netherlands
Some questions and hints:

Code:
{news assign='news_there'}


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 [i]empty(...) will return false if a non-empty string is returned. A string of one space (' ') is non-empty too.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
A2 Hosting