getDoctype
getdoctype
About
With this snippet you will have the ability to display the DOCTYPE while sending the correct headers with support for content type negotiation.
It also will correct itself for the W3C validator which does not send the correct Accept header for XHTML documents.
Does NOT send XHTML 1.1 to browsers that wont accept application/xhtml+xml because the snippet will make sure the browser groks XML before sending anything.visit: labs/PHP/DOCTYPE.php#bug-fix for details and a link to the W3C XHTML for more
Installation & usage
&doc — string (req) HTML or XHTML&type — string (opt) Strict, Transitional, or Frameset&ver — string (opt) For XHTML: 1.0 or 1.1 | For HTML5: 5
EXAMPLETo specify html5 use the following:
[[!getDoctype? &doc=`html` &ver=`5`]]Output:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8">At a glance
MODX 3 compatibility unknown. Based on our testing and community reports where available.
- Developer demon.devin
- Latest release November 26, 2016 (9 years ago)
- First seen in SiteDash November 26, 2016 (9 years ago)
- License GPLv2
- MODX support 2 – 2.5
- Databases MySQL
| Changelog | |||
|---|---|---|---|
| MODX.com |
1.0.0-beta1 |
November 26, 2016
9 years ago |
— |
|
No matching releases. |
|||