By Lee Sykes
March 2007
In previous tutorials we have explained how to create pure CSS XHTML compliant skins along with the coding best practices.
However, where DotNetNuke has always caused problems is that it generates non-compliant XHTML code, so even if your skin is fully XHTML compliant, your DotNetNuke portal will not pass the XHTML validation tests because the core code generates non-compliant code.
In this tutorial we walk you through the steps needed to enable your DotNetNuke installation to become XHTML compliant. These steps will only work with the latest 4.4.x version of DotNetNuke.
Preparation
Throughout the tutorial we use the free
XHTML compliant Simple Red Leaf Skin.
In DotNetNuke v4.4.1 you will need to follow this tutorial to fix a current bug:
How to fix the [DROPDOWNACTIONS] token bug in DotNetNuke 4.4 .1
You are now ready to adjust the core code that DNN produces to make it XHTML compliant.
Video contents:
Video 1
- Introduction
- Testing a default installation of DNN using the DNN blue skin for compliance (130 errors)
- Testing a default installation using the simple red leaf skin (XHTML compliant skin) (18 errors) for XHTML compliance
- Viewing the compliance errors
- Tag well-formedness
- Viewing the page source, the meta tags do not have closing tags
- How to edit the web.config file to produce ASP.NET code that complies with XHTML
- Viewing the page source
- Metatags are now well formed
- Validating the HTML (7 errors)
- Viewing the first error, <style
Time Length: 6min 9secs
Video 2
- Technique for investigating the errors
- Reformatting the document in Visual Web Developer
- Displaying the errors within VWD
- How to display the XHTML validation errors in VWD
- How to view the error in Visual Web Developer
- Adding the type attribute
- Editing the default.aspx file
- How to fix the style validation error
- Validating the page (6 errors)
- Viewing the errors caused by body tag attributes
- How to remove the body tag attributes
Time Length: 8min 39 secs
Video 3
- Validating the page (tentatively passed validation)
- Character Encoding error
- How to add Character Encoding using a metatag
- How to fix the html tag error
- Validating the page (Passed Validation)
- DotNetNuke now produces valid XHTML compliant code using the Text / HTML module
- Working with other modules
- The links module produces invalid XHTML compliant code
- Viewing the errors produced by the links module
- Viewing the links module installation files
- Opening the links module file in VWD
- Searching for the non-compliant code
- How to fix the non-compliant code in the links module
- Validating the links module (passes validation)
- An example of other core modules
- Conclusion
Time Length: 10min 16 secs
Total Time Length: 25min 4 secs
References and useful links
Red Leaf CSS Skin
How to select DOC TYPES in DotNetNuke 4.4.x
How to fix the [DROPDOWNACTIONS] token bug in DotNetNuke 4.4.1
Validate your HTML code at W3C
Validate your CSS code at W3C
Firefox Browser
Web Developers Toolbar for Firefox
XHTML and best practice coding for skins and modules in DotNetNuke
Once you have configured DotNetNuke to create XHTML compliant code, you also need to ensure that the default.css file uses compliant CSS code. We have already created a tutorial covering this here:
Reducing the DotNetNuke CSS file sizes