Developer forum

Forum » Templates » Newsv2 module - HTML 5 - W3C valid

Newsv2 module - HTML 5 - W3C valid

P. Ruiter
Reply
Hi Dynamicweb,

When using the Newsv2 module on a page, I am not able to validate my page as HTML5 in the W3C validation service.

Two errors are visible (see below). How can I remove the Included JS and CSS from the HEAD of my page? Why doen't the Dynamicweb URL rewriting, rewrite the URL's clean (with & instead of &)?

Kind Regards,

Pim

Error 1: Stray end tag link.
…="stylesheet" type="text/css" href="/files/templates/newsv2/newsv2.css"></link>  Error 2: Amp in Link  & did not start a character reference. (& probably should have been escaped as &amp;.)
    ..my-dw-newsitem.aspx?Action=1&PID=51" title="my-news-item…

Replies

 
Dmitry Nikolenko
Reply
Hi Pim,

All stysheets and Js are included on a page thought tags <!--@Stylesheets--> and <!--@Javascripts--> which are placed in master template.
About end link tag. We can't reproduce the situation, try please upgrade your DW solution to the latest version.
About "&amp;" in URLs. We know about this problem, related bug is #5730.
 
Nicolai Høeg Pedersen
Reply
Hi Pim.

If you on the websites properties, on the edit dialog set the html type to xhtml 1 or html 5, the header section will validate as well:
http://manual.dynamicweb-cms.com/Dynamicweb-On-line-Manual/Modules/Websites/Module-setup/Edit-website.aspx

Also take a look at dynamicweb.dk - it validates html 5.

 
Morten Bengtson
Reply
@Nicolai > Well, dynamicweb.dk does not validate either... http://validator.w3.org/check?uri=http%3A%2F%2Fwww.dynamicweb.dk%2Fnyheder.aspx&charset=utf-8&doctype=HTML5&group=0&user-agent=W3C_Validator%2F1.2

@Dmitry > If we remove <!--@Stylesheets--> and <!--@Javascripts-->  then how do we output the css/js we selected under paragraph module settings (theme)?

/Morten
 
Nicolai Høeg Pedersen
Reply
@Morten.

That page does not - but it is Newsv1 on that page (and that validates), and the validation errors are the links from the RSS module (the & problem) - the validation error Pim mentions is due to the head section and that can be fixed by changing html type.

 
P. Ruiter
Reply
Hi Guys,

Thanks for your feedback! I will look into it.

Pim

 
P. Ruiter
Reply
Hi Pim,

All stysheets and Js are included on a page thought tags <!--@Stylesheets--> and <!--@Javascripts--> which are placed in master template.
About end link tag. We can't reproduce the situation, try please upgrade your DW solution to the latest version.
About "&amp;" in URLs. We know about this problem, related bug is #5730.
We are using the new designs & layout approach. So no master template with these tags.

The version we use is 19.2.2.1.

The problem with the amp's is also the case when you enter custom external links in for example the image properties on a paragraph.

 
P. Ruiter
Reply
Hi Pim.

If you on the websites properties, on the edit dialog set the html type to xhtml 1 or html 5, the header section will validate as well:
http://manual.dynamicweb-cms.com/Dynamicweb-On-line-Manual/Modules/Websites/Module-setup/Edit-website.aspx

Also take a look at dynamicweb.dk - it validates html 5.

When setting the HTML type to HTML5, the system will not validate the Newsv2 css include. When leaving the HTML type blank, the system (except the &amp; links) will HTML5 validate.
 
Remi Muller
Reply
 Hi,
We are using the designs and layouts. There is no tag for the stylesheets and javascripts.

What would help us is if we could disable the insertion of the link and script tags. Is this possible?

Kind regards,
Remi
 
Nicolai Høeg Pedersen
Reply
I will add an option so these tags will never be parsed.

Until then you can do like this in the head section of your layout template:

<!--
<!--@Javascripts-->
<!--@Stylesheets-->
-->


 
Morten Bengtson
Reply
@Nicolai: What about an option so the tags only output the resources we have manually selected on the paragraph module settings?

@Remi: An alternative solution to hide the scripts and stylesheets is to use If Defined...
<!--@If Defined(undefined)-->
<!--@Javascripts-->
<!--@Stylesheets-->
<!--@EndIf(undefined)-->
...where undefined is just a dummy value. This way you don't get any comment garbage in your html ;-)

Just be aware that disabling scripts might affect Dynamicweb statistics and advanced functionality of some modules.

/Morten

 
Nicolai Høeg Pedersen
Reply
Hi Morten

Options on their way...

 
Remi Muller
Reply
 Thanks for the great feedback. And better options on the way. :)
@Morten it is probably better not to exclude the scripts but only the css.

Kind regards,
Pim and Remi

 
P. Ruiter
Reply
Hi Morten

Options on their way...

Hi Nicolai,

Could you give me an update which Dynamicweb release will contain the &amp; URL rewrite option? And when we can expect the update?

Kind Regards,

Pim

 

You must be logged in to post in the forum