Project

General

Profile

Actions

Feature #22992

closed

Pagerenderer - use better method for adding meta tags

Added by Steffen Kamper about 14 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2010-06-25
Due date:
% Done:

100%

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

Description

atm meta tags are added with complete html tag.
The better method would be to add tags with a name and the content.

Additional you can add additional parameters as key/value pairs in an array.

There is an exception: if in this additional parameters a pair exists with key "http-equiv", it replaces the name.

Examples:

$pageRenderer->addMetaTag('author', 'John Doe');
=>
<meta name="author" content="John Doe" />

$pageRenderer->addMetaTag('robots', 'noindex');
=>
<meta name="robots" content="noindex" />
$pageRenderer->addMetaTag('author', 'John Doe');

$pageRenderer->addMetaTag('', '5; URL=http://www.example.org/', array('http-equiv' => 'refresh');
=>
<meta http-equiv="refresh" content="5; URL=http://www.example.org/" />

$pageRenderer->addMetaTag('DC.format', 'text/html', array('scheme' => 'DCTERMS.IMT');
=>
<meta name="DC.format" content="text/html" scheme="DCTERMS.IMT">

(issue imported from #M14860)


Files

14860.diff (1.45 KB) 14860.diff Administrator Admin, 2010-06-25 01:17
14860_v3.diff (2.38 KB) 14860_v3.diff Administrator Admin, 2010-09-23 09:33
14860_v4.diff (2.38 KB) 14860_v4.diff Version 4 of the patch Jigal van Hemert, 2016-06-09 14:27
14860_test.diff (1.64 KB) 14860_test.diff Version 4 of the unit tests Jigal van Hemert, 2016-06-09 14:27

Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #58167: Meta-Tag http-equiv="Content-Type" content="text/html [...]"Closed2014-04-24

Actions
Related to TYPO3 Core - Feature #52471: PageRenderer: Allow Meta Tag overridingClosed2013-10-02

Actions
Related to TYPO3 Core - Feature #81464: Add API for meta tag managementClosedRichard Haeser2017-06-03

Actions
Actions #1

Updated by Simon Schick about 14 years ago

Please add a manual how I can access this in TypoScript if you've finished this task.

I'm looking forward to use it.

Actions #2

Updated by Ernesto Baschny almost 14 years ago

@Simon, if you are still interested, test v3 of the patch and take a look at it and then come to the core list and give your vote (+1). See http://typo3.org/teams/core/core-mailinglist-rules/

Actions #3

Updated by Xavier Perseguers almost 13 years ago

  • Target version changed from 4.6.0-beta1 to 4.6.0-beta2
Actions #4

Updated by Xavier Perseguers almost 13 years ago

  • Target version changed from 4.6.0-beta2 to 4.6.0-beta3
Actions #5

Updated by Oliver Hader almost 13 years ago

  • Target version changed from 4.6.0-beta3 to 4.6.0-RC1
Actions #6

Updated by Xavier Perseguers almost 13 years ago

  • Target version changed from 4.6.0-RC1 to 4.6.0
Actions #7

Updated by Chris topher over 12 years ago

  • Target version changed from 4.6.0 to 4.6.1
Actions #8

Updated by Chris topher over 12 years ago

  • Target version changed from 4.6.1 to 4.6.2
Actions #9

Updated by Xavier Perseguers over 12 years ago

  • Assignee deleted (Steffen Kamper)
  • Target version deleted (4.6.2)
Actions #10

Updated by Alexander Opitz over 9 years ago

  • Status changed from Accepted to Needs Feedback
  • Is Regression set to No

Hi,

does the problem still exists within newer versions of TYPO3 CMS (6.2.9)?

Actions #11

Updated by Simon Schaufelberger over 9 years ago

Alexander, this is a feature, not a bug!

Actions #12

Updated by Alexander Opitz over 9 years ago

Yes, but the question remains.
Does something exists, like you requested it, in 6.2 or not?

Actions #13

Updated by Simon Schaufelberger over 9 years ago

check source code ;) haha of course not.

Actions #14

Updated by Riccardo De Contardi over 8 years ago

  • Category set to Frontend
Actions #15

Updated by Alexander Opitz about 8 years ago

  • Status changed from Needs Feedback to Closed

No feedback within the last 90 days => closing this issue.

If you think that this is the wrong decision or experience this issue again, then please write to the mailing list typo3.teams.bugs with issue number and an explanation or open a new ticket and add a relation to this ticket number.

Actions #16

Updated by Simon Schaufelberger about 8 years ago

please reopen!

Updated by Jigal van Hemert about 8 years ago

Review in core list was never finished. Attached v4 of the patch and unit tests.

Can you apply appropriate changes to the current master and push to gerrit?

Actions #18

Updated by Gerrit Code Review about 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48552

Actions #19

Updated by Gerrit Code Review about 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48552

Actions #20

Updated by Gerrit Code Review about 8 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48552

Actions #21

Updated by Gerrit Code Review about 8 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48552

Actions #22

Updated by Gerrit Code Review about 8 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48552

Actions #23

Updated by Gerrit Code Review about 8 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48552

Actions #24

Updated by Gerrit Code Review about 8 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48552

Actions #25

Updated by Riccardo De Contardi almost 7 years ago

I summarize here the content of the issue #58167 (related to this one) to keep track of it:

If you write in your TS template:

config.doctype = xhtml_11

or even

config.doctype = xhtml_11
config.additionalHeaders = Content-Type: application/xhtml+xml

the output will always be <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> instead of <meta http-equiv="Content-Type" application/xhtml+xml; charset=utf-8"/> . Also the response header will be still Content-Type:text/html; charset=utf-8

The only way to wirte the correct meta http-equiv would be remove everything with

 disableAllHeaderCode = 1
Actions #26

Updated by Riccardo De Contardi almost 7 years ago

Actions #27

Updated by Riccardo De Contardi almost 7 years ago

  • Status changed from Under Review to Closed

I close this as duplicate; please continue on #81464. Thank you.

Actions #28

Updated by Gerrit Code Review almost 7 years ago

  • Status changed from Closed to Under Review

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53110

Actions #29

Updated by Gerrit Code Review almost 7 years ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53110

Actions #30

Updated by Gerrit Code Review almost 7 years ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53110

Actions #31

Updated by Gerrit Code Review almost 7 years ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53110

Actions #32

Updated by Gerrit Code Review almost 7 years ago

Patch set 19 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53110

Actions #33

Updated by Gerrit Code Review almost 7 years ago

Patch set 20 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53110

Actions #34

Updated by Gerrit Code Review almost 7 years ago

Patch set 21 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53110

Actions #35

Updated by Gerrit Code Review almost 7 years ago

Patch set 22 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53110

Actions #36

Updated by Mathias Schreiber over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #37

Updated by Benni Mack almost 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF