[TYPO3-core] RFC #14322 : Feature: Include robots noindex meta tag in typo3 backend, especially login page

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Jun 24 09:35:50 CEST 2010


Steffen Kamper schrieb am 23.06.2010 19:10:
> Hi,
> 
> Ernesto Baschny [cron IT] schrieb:
>>
>> Maybe our PageRenderer-king (Steffen Kamper) could give us an insight on
>> what is in his head on that matter, because I am pretty sure he already
>> has some nice ideas for the PageRenderer of the future 4.5. :)
>>
> 
> hehe - nice title :)
> Indeed i dislike the way meta tags are added atm. This was done to have
> the compatibility to the way it was done before.
> 
> Your suggestion is the right one - a better way to add meta tags like
> you suggested. If you see a good way to find common params for meta tag
> i would be happy using your suggestion ;)

My suggestion:

	$pageRenderer->addMetaTag($name, $content, $scheme = '', $httpEquiv =
'', $otherAttributes = array());

As name="" and content="" are the most commonly used attributes for a
meta tag. $scheme is the next most common one (see dublin core
definitions) and $httpEquiv as the last common attribute. In
$otherAttributes on could have even other stuff (like "lang=", "id=" or
other common XHTML attributes).

As addMetaTag() has been public since 4.3, it has to have a different
name or the same method has to cope with both old (only one parametr)
and new way (e.g. make $content also optional and if $content=='', use
$name as the whole meta tag, and log to deprecation log).

Then have a addRobots helper which can be used by the template.php for
the backend:

function addRobots($content='noindex,norobots') {
	$this->addMetaTag('robots', $content);
}

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list