0
votes

I am currently migrating tt_news to news. The old news system also has news-entries shown as events. Is it somehow possible to hide entries that are past, without having to archive those? Or else to show only entries within the next x days?

This was possible with tt_news typoscript:

extensions.ttnews_selectconf {
    andWhere (
        tt_news.datetime < (UNIX_TIMESTAMP() +604800)
        AND tt_news.datetime > (UNIX_TIMESTAMP()-86400)
    )
}

I could not find anything in the news docs.

1

1 Answers

1
votes

The news extension has a TypoScript option to set a minimum date/time: https://docs.typo3.org/typo3cms/extensions/news/stable/AdministratorManual/Configuration/TypoScript/Index.html#timerestriction

So plugin.tx_news.settings.timeRestriction = now will show news items starting now. plugin.tx_news.settings.timeRestriction = today will show news items starting at the start of today.

For a maximum date you can use timeRestrictionHigh

Also, if you're using news for events, you might want to check out the eventnews extension. This extends the news extension to add fields and views that are useful for events. https://extensions.typo3.org/extension/eventnews