Project

General

Profile

Actions

Feature #16053

closed

Feature Request: Ability to change content-type in the meta tag

Added by Neil Bertram over 18 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2006-04-13
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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

class.tslib_fe,php.diff (681 Bytes) class.tslib_fe,php.diff Administrator Admin, 2006-04-14 16:01
class.tslib_pagegen.php.diff (498 Bytes) class.tslib_pagegen.php.diff Administrator Admin, 2006-04-14 16:02
Actions #1

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

Actions #2

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)

Actions #3

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?

Actions #5

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

Actions

Also available in: Atom PDF