Skip to content
This repository was archived by the owner on Aug 8, 2022. It is now read-only.
This repository was archived by the owner on Aug 8, 2022. It is now read-only.

Add support for EXT:news description field #183

Open
@AstCommodore

Description

@AstCommodore

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é

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions