TYPO3-metaseo icon indicating copy to clipboard operation
TYPO3-metaseo copied to clipboard

Add support for EXT:news description field

Open AstCommodore opened this issue 10 years ago • 1 comments

Please add support for the field EXT:news->description as it is used in tx_news 2.2.4 in partial Opengraph.html:

<f:if condition="{newsItem.description}">
    <f:then>
        <n:metaTag name="description" content="{newsItem.description}" />
        <n:metaTag property="og:description" content="{newsItem.description}" />
    </f:then>
    <f:else>
        <n:metaTag name="description" content="{newsItem.teaser}" />
        <n:metaTag property="og:description" content="{newsItem.teaser}" />
    </f:else>
</f:if>

In MetatagPart.php there is a routine to setup the field news->teaser as meta:description, so something like this should added here:

if( isset($GLOBALS['TSFE']->register['newsDescription']) ) {
            $connector->setMetaTag('description', $GLOBALS['TSFE']->register['newsDescription']);
        } else {
            if( isset($GLOBALS['TSFE']->register['newsTeaser']) ) {
                $connector->setMetaTag('description', $GLOBALS['TSFE']->register['newsTeaser']);
            }
        } 

But this is only half the way. I'm not deep into the code, maybe it's possible for you to add this feature easily.

Greetings, André

AstCommodore avatar Nov 02 '15 10:11 AstCommodore

please also add support for other news "meta" fields like the news "alternative_title" field for example!

tobiasgraeber avatar Jul 13 '17 17:07 tobiasgraeber