Feature #16053
closedFeature Request: Ability to change content-type in the meta tag
0%
Description
In class.tslib_pagegen.php, line 476 (T3 4.0 final) is the standard meta tag output for HTML:
<meta http-equiv="Content-Type" content="text/html; charset='.$theCharset.'" />'
With the new CSS Styled Content being much more semantic, and the availability of the (very useful) svo_mimetypesniffer extension, serving pages as real application/xhtml+xml (conditional on the browser accepting it) is a possibility, and indeed works well!
Although the HTTP header for the content-type can be overriden using config.additionalHeaders, there is no way to change the hardcoded text/html meta tag to application/xhtml+xml (or remove it entirely) short of disabling all header code and respecifying it with typoscript.
It would be nice to have a content-type option available in the CONFIG section that is substituted into the meta tag and the HTTP header cleanly, just as the charset is. If this was copied into the TSFE array as the charset is, making the changes would be a simple grep-and-replace job.
I'm happy to submit patches against CVS for this if you like.
(issue imported from #M3263)
Files
Updated by Martin Kutschker over 18 years ago
I suggest config.contentType for it.
The changes to the code should go here:
class.tslib_pagegen.php:renderContentWithHeader()
Updated by Neil Bertram over 18 years ago
Ok I've made a couple of patches which work. I modified tslib_fe as well to get the Content-Type header right.
I tried to work it into the TSFE array as contentType, but couldn't find an appropriate place to initialise it, so this second attempt simply reads it straight out of the config array both in tslib_fe and tslib_pagegen.
The TSRef docs should probably be updated at some point in the future to reflect this patch.
(unified diffs attached)
Updated by Alexander Opitz over 11 years ago
- Category deleted (
Communication) - Status changed from New to Needs Feedback
- Target version deleted (
0) - PHP Version deleted (
5)
Does such a feature is found in newer Versions of TYPO3 CMS like 4.5 or 6.0?
I thought yes, this was changed, but can you verify that?
Updated by Wouter Wolters over 11 years ago
It is in the documentation, see http://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Config/Index.html
Updated by Chris topher over 11 years ago
- Status changed from Needs Feedback to Closed
Yes, that is possible nowadays.
Not only with one of the "config" options, but also with the options under "meta"; see here: http://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Meta/Index.html