Developer forum

Forum » Templates » Removing standard DW JS & CSS

Removing standard DW JS & CSS


Reply

 Hi,

 

I want my webmaster to be able to include a different stylesheet and javascript file pr. Stylesheet.

 

I use the <!--@Stylesheet--> & <!--@Javascript--> in master to be let my webmaster in control of which files to insert.

 

When he use the include in Stylesheet>(myStyleSheet)>Page>Template>Include, 

I get a couple of unwanted DW stylesheet and javascript:

 

<link rel="stylesheet" type="text/css" href="/Files/Legend1.css">

....

 

 

<script type="text/javascript" src="/Admin/Public/DWscripts.js"></script>

<script type="text/javascript" src="/Files/imgSS1.js"></script>

 

How do I get rid of those?

 

/Christian

aparte

 


Replies

 
Nicolai Høeg Pedersen
Reply
christian@aparte.dk wrote:

 Hi,

 

I want my webmaster to be able to include a different stylesheet and javascript file pr. Stylesheet.

 

I use the <!--@Stylesheet--> & <!--@Javascript--> in master to be let my webmaster in control of which files to insert.

 

When he use the include in Stylesheet>(myStyleSheet)>Page>Template>Include, 

I get a couple of unwanted DW stylesheet and javascript:

 

<link rel="stylesheet" type="text/css" href="/Files/Legend1.css">

....

 

 

<script type="text/javascript" src="/Admin/Public/DWscripts.js"></script>

<script type="text/javascript" src="/Files/imgSS1.js"></script>

 

How do I get rid of those?

 

/Christian

aparte

 

I guess you found the "disable dynamicweb generated css" in control panel -> stylesheet. That removes some of it.
 

 

To remove legend1.css, remove "Breadcrumb trail" setting on the page properties tab on stylesheet>page.

 

DWScript.js can not be removed.

 

Tom remove /Files/ImgssX.js files, remove all images from the stylesheets navigation items.

 
Reply
Super! Thats exactly what I was looking for
/C
PS! To bad that I can't get rid of DWscripts.js though
 
Reply
It would be nice if we could have a checkbox for removing DwScripts.js from @Javascripts - just like the one for removing generated CSS.

DwScripts.js is of little or no use in frontend and does nothing but slow things down. The script primarily contains functions used by the old navigation, legacy modules and controls in Admin.

Removing the @Javascripts tag from the template is not an option as it also removes any scripts we have added to module paragraphs.
 
Nicolai Høeg Pedersen
Reply
Coming up - see screendump!
 
Reply
Hi Nicolai,

You forgot to attach the screen dump :P

nuno
 
Nicolai Høeg Pedersen
Reply
Oh... Sorry
dwscripts.PNG
 
Reply
Grrreat! :)
 
Reply
Some standard modules and things like datetime fields in forms adds javascript and css to the page.

Is it possible to remove those resources by configuration or do we have to code some kind of output replacer to remove all unwanted resources from the markup?

It would help a lot if we could disable stuff like this - either in management center or in the module settings on each paragraph.

Another solution could be to provide alternative tags that only includes the scripts/css added on the module settings (theme) - e.g. @ModuleJS as an alternative to @Javascripts and @ModuleCSS as an alternative to @Stylesheets.

BR.
Morten

 

You must be logged in to post in the forum