image

TYPO3 add news metadata to detail view page.

Below typoscript, adds news metadata to page, like this

<meta name="keywords" content="newskeyword1,keyword2" />

[globalVar = TSFE:id = {$news_detail_pid}]

#Remove default metadata and add news metadata

page.meta.keywords >

page.headerData.99980 {

    local >

    local {

        description.data = register:newsTitle

        keywords.data = register:newsKeywords

    }

}

[global]