Developer forum

Forum » CMS - Standard features » Prevent News app from including js-file

Prevent News app from including js-file

Martin Christensen
Reply

Hi,

I noticed that the News app insert a reference to /Files/Templates/NewsV2/newsfunctions.js before the closing </head> tag.

Is there any way to prevent this?

It can just be an empty file, but it's still a reference to a js-file. This is a slight issue when used in email marketing, since javascript can be seen as potentially harmful by some email clients. (I'm going for a perfect score on mail-tester.com)

In DW8 you used to be able to opt for no file to be included in the paragraph setup.

 

Best regards,

Martin


Replies

 
Nicolai Pedersen
Reply

Hi Martin

News i super duper deprecated! Should use items.

In your layout template you have a <!--@JavaScript--> or GetString("JavaScript") - if you remove that and include other files that might be needed manually, you can get rid of the news js.

BR Nicolai

 
Martin Christensen
Reply

Hi Nicolai,

thanks for the quick reply!

Yeah, its a little obsolete, but some customers are still using it.

I have no such tags in any template, but the reference is inserted anyway.

Maybe the only solution is to just switch to items :)

Best regards,

Martin

 
Nicolai Pedersen
Reply

If you do not have that tag, you probably do not even use layouts but the design system from before that...?

 
Martin Christensen
Reply

It's a solution with a lot of history, so it is possible that it used to run the old design system. Maybe there was a setting back then that isn't visible anymore but is somehow still in effect. It's currently running 9.8.11

 
Nicolai Pedersen
Reply
This post has been marked as an answer

ok, found out that you can set /Globalsettings/Settings/Designs/IgnoreAllModuleJsAndCss to true in global settings. That will remove this js.

Votes for this answer: 1
 
Martin Christensen
Reply

That's great! I was going through GlobalSettings myself, but I hadn't found the right setting.

Thank you so much :)

 

You must be logged in to post in the forum