Jump to:

23493 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Generating HTML5 with SilverStripe

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1950 Views
  • Xurk
    Avatar
    Community Member
    50 Posts

    Generating HTML5 with SilverStripe Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: Generating HTML5 with SilverStripe Link to this post

    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!

  • Xurk
    Avatar
    Community Member
    50 Posts

    Re: Generating HTML5 with SilverStripe Link to this post

    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 ;)

    1950 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.