You are here: All articles » Programming » Set meta description in extension
-
Set meta description in extension
written: 14 years ago category: Programming Previous Next
To set a page title from within any Typo3 extension, you just access the relevant page array item:
$GLOBALS['TSFE']->page['title'] = 'My title'
Now, if you expect this to work also for the meta description you will probably be disappointed. Try this instead, which worked for me on a 4.1 installation:
$GLOBALS['TSFE']->cObj->data['description'] = 'My description'
Comments:
Leave a comment
macke 14 years ago Permalink
bahnhof?koffer klauen?
SenioreT 9 years ago Permalink
Works for me. Thank you.