Project

General

Profile

Actions

Feature #22992

closed

Pagerenderer - use better method for adding meta tags

Added by Steffen Kamper almost 14 years ago. Updated over 5 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

Also available in: Atom PDF