How can I get the second image in template for news extension of GeorgeRinger in TYPO3.
I extend the showinpreview field with "show in teaser" and I want to acces the second image, or better the image where "show in teaser" was set, in the templatefile for the teaser.
If I debug the newsItem.mediaPreviews, there ist only one image, but I set two in the backend… so how can I get the other image.
Thanks
TYPO3: 9.5.14 news: 7.3.1
If you check out the model News
you will see this:
public function getMediaPreviews()
{
$configuration = [FileReference::VIEW_LIST_AND_DETAIL, FileReference::VIEW_LIST_ONLY];
return $this->getMediaItemsByConfiguration($configuration);
}
This means that you only get those with the allowed types.
As a solution there are 2 options:
{newsItem.getMedia}
and check in the <f:for>
for the value