Set meta description in extension
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'
Leave a comment