Way2CU / Caracal

Fast, lightweight, developer oriented framework.
GNU General Public License v2.0
8 stars 5 forks source link

Add document type support to `document` tag. #31

Closed MeanEYE closed 7 years ago

MeanEYE commented 8 years ago

Each template parser instance should be configurable from the template file itself. This will provide biggest flexibility and allow for different usage cases.

Right now system decides on document type globally for the whole site and echoes doctype via variable name:

<document>
    <cms:var name="_DOCTYPE"/>

This constant (_DOCTYPE) is defined based on config file values and is global to the site. Instead support should be added to specify through attribute like so:

<document type="html5">

This is more flexible way as it would allow for mixed document types and opens for new usage cases like having sitemap.xml automatically generated and SVG optimization support.