[Typo3-dev] Please review this patch to disable generation of empty title tags.

Hannes Schmidt mail at hannesschmidt.de
Mon Nov 22 16:10:17 CET 2004


Maybe someone could review and apply the following patch to the 3.7.0
version of class.tslib_pagegen.php. It disables the emission of an empty
title tag. This would be useful in order to suppress Typo3 default title tag
in case the user's template generates the title as described on
http://www.hannesschmidt.de/drupal/node/7.

The patch suppresses the emission of a title tag if the tag's content would
be empty. Once this patch is included in the next version of Typo3, the user
can disable the generated title tag by setting config.noPageTitle to 1 and
config.siteTitle to an empty string.

-- Hannes

--- class.tslib_pagegen.php.old Mon Nov 22 15:03:47 2004
+++ class.tslib_pagegen.php     Mon Nov 22 14:56:21 2004
@@ -605,8 +605,10 @@
                        $titleTagContent =
$GLOBALS['TSFE']->cObj->callUserFunction($GLOBALS['TSFE']->config['config'][
'titleTagFunction'], array(), $titleTagContent);
                }

-               $GLOBALS['TSFE']->content.='
+               if( $titleTagContent ) {
+                       $GLOBALS['TSFE']->content.='
        <title>'.htmlspecialchars($titleTagContent).'</title>';
+               }
                $GLOBALS['TSFE']->content.='
        <meta name="generator" content="TYPO3 3.7 CMS" />';







More information about the TYPO3-dev mailing list