[FEATURE] Add stdWrap functionality to page.headTag 81/35481/4
authorBenjamin Mack <benni@typo3.org>
Mon, 15 Dec 2014 14:41:16 +0000 (15:41 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Mon, 15 Dec 2014 21:23:56 +0000 (22:23 +0100)
The option page.headTag has stdWrap properties
added.

Resolves: #22086
Releases: master
Change-Id: I397bb0c82b350b31ab85fbcb7d83070036db20b8
Reviewed-on: http://review.typo3.org/35481
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Documentation/Changelog/master/Feature-22086-StdWrapForHeadTag.rst [new file with mode: 0644]
typo3/sysext/frontend/Classes/Page/PageGenerator.php

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Feature-22086-StdWrapForHeadTag.rst b/typo3/sysext/core/Documentation/Changelog/master/Feature-22086-StdWrapForHeadTag.rst
new file mode 100644 (file)
index 0000000..3627793
--- /dev/null
@@ -0,0 +1,20 @@
+=====================================================
+Feature: #22086 - Add .stdWrap to page.headTag option
+=====================================================
+
+Description
+===========
+
+The TypoScript setting page.headTag now has stdWrap functionality available.
+
+The new option can be set like this:
+
+.. code-block:: typoscript
+
+       page = PAGE
+       page.headTag = <head>
+       page.headTag.override = <head class="special">
+       page.headTag.override.if {
+         isInList.field = uid
+         value = 24
+       }
\ No newline at end of file
index 9ce4dfd..c33fccf 100644 (file)
@@ -403,6 +403,9 @@ class PageGenerator {
                $pageRenderer->setHtmlTag($htmlTag);
                // Head tag:
                $headTag = $GLOBALS['TSFE']->pSetup['headTag'] ?: '<head>';
+               if (isset($GLOBALS['TSFE']->pSetup['headTag.'])) {
+                       $headTag = $GLOBALS['TSFE']->cObj->stdWrap($headTag, $GLOBALS['TSFE']->pSetup['headTag.']);
+               }
                $pageRenderer->setHeadTag($headTag);
                // Setting charset meta tag:
                $pageRenderer->setCharSet($theCharset);