21286 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1485 Views |
-
Generating HTML5 with SilverStripe

16 December 2010 at 2:04am
Our company is testing out the waters in developing websites using HTML5 (supported by Boilerplate) and seeing as we're also trying to move towards developing our high-profile websites using SilverStripe, I'm doing both for a project at the moment.
What I'm wondering - and haven't come across via Google or on the boards here - is if there are any possibilities (for say, the config file) to instruct SilverStripe to produce HTML5 where possible?
I'm not talking about generating whole templates or generating HTML5 tags, but smaller things. For example, in HTML5 it's no longer required to close off certain tags like <br> and <img> anymore, though you're allowed to do so if you wish. Also, tag attributes such as "type" are no longer required for (e.g.) <script>. I've decided to embrace these possibilities and therefore have done my mark-up for the templates in this fashion.
But seeing as I also use Requirements for including my CSS and JavaScript in the template, SilverStripe generates XHTML mark-up for the related tags. It's not a huge deal or anything, but if it's possible (without having to "hack into" the core files to - for example - change the line where <script> elements are outputted), I'd prefer to set the installation up to generate HTML5 for these types of things.Anyone have any ideas?
-
Re: Generating HTML5 with SilverStripe

16 December 2010 at 11:14am
We're migrating everything to HTML5 slowly bit by bit but most of the core still won't make any changes based on your html5 doctype. At the moment things like ignoring script type is not possible but having a type doesn't make it invalid html5 AFAIK so not a big deal. Next major release should hopefully include support for html5 form types which would be a great step!
-
Re: Generating HTML5 with SilverStripe

16 December 2010 at 10:34pm
Thanks for your response Willr. It's nice to know that HTML5 support will be gradually creeping into SilverStripe. I agree with you, adding support for the real interesting HTML5 tags (e.g. the form types) would be great
You're right about things like the "type" attribute aren't a big deal as it's still valid in HTML5, but I was thinking that if it was as easy as flipping a switch (i.e. adding a line to _config.php) it was worth it ;)
| 1485 Views | ||
|
Page:
1
|
Go to Top |


