Jump to:

23453 Posts in 18902 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Getting strict HTML compliance.

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: 993 Views
  • bobdobbs
    Avatar
    Community Member
    6 Posts

    Getting strict HTML compliance. Link to this post

    Hi all.

    One of the reasons that I'm looking into silverstripe is that it seems that if I set it up properly, I can deliver my documents compliant to strict hmtl 4. Most other cms's make it difficult or nigh impossible to deliver content as anything other then xhtml or tag soup.

    The docs for 'content negotiator' states:
    "If you have not specified a correct xml header to your root Template file ... then SilverStripe will rewrite the Doctype and your html to confirm to HTML 4 Strict instead of serving it as XHTML"

    This seems to have some undocumented limitations.

    So far, I've found that I've had to override functions from SiteTree.php in my 'MyOwnPageType.php' in order to make metatags compliant with strict html 4. My next step is to figure out how to do the same for css links in the document head.

    My questions are:

    If I want to prioritise delivery of content compliant to a strict html doctype, is silverstripe for me?
    (I will be wanting to use a blog module to deliver html as well)

    If delivering strict html is not an insurmountable challenge, what resources and documentation should I be paying particular attention to? What issues should I be aware of?

    Please note that this is not a complaint or a gripe. I've spent a couple of days solidly assessing silverstripe, and I'm really impressed with it. I just have to yet figure out if it suits my particular needs.

    Thanks.

  • baba-papa
    Avatar
    Community Member
    279 Posts

    Re: Getting strict HTML compliance. Link to this post

    All html is generated in a method or a template. Feel free to customize any html output.

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Getting strict HTML compliance. Link to this post

    From my experience, SilverStripe does a great job delivering valid (X)HTML. Of course it does depend on your templates, but also modules and stuff like forms or the wysiwyg editor seem to be written very well in that aspect. And if you need some other markup you can always override the template for that specific part.

    Compared to other CMS I used, getting valid (X)HTML with SilverStripe is a breeze.
    Maybe also have a look at this: http://doc.silverstripe.org/doku.php?id=contentnegotiator

    Edit Regarding the stylesheet links: Don't use the Requirements class to output stylesheets, simply include the stylesheets you need in the html head (as you would do with a static html page)?

    993 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.