tx_news Define preview image
If you want to differentiate the preview image between different pages, each of which contains a news plug-in with the "List" display, a template is created on the respective page. The snippet can then be integrated there.
Simply change other properties
Where can I find further options? All properties can be accessed via the "Template" sidebar. After clicking on the page with the contained Typo3 template, the "Account Editor" usually opens. Here we find the paths to the news template under PLUGIN.TX_NEWS
Path to template root (FE) / z.B. news-archive/Resources/Private/Templates/
Path to template partials (FE) / z.B. news-archive/Resources/Private/Partials/
Path to template layouts (FE) / z.B. news-archive/Resources/Private/Layouts/
Path to CSS file / z.B. news-archive/Resources/Public/Css/news-basic.css
The templates can be customised directly here.
TypoScript-Objekt-Browser
Now switch to the "TypoScript object browser" via the "Contant editor" dropdown.
"Setup" should be displayed under "Browse". Now you get a kind of "Sitemap". In this we can navigate via "plugin" to "tx_news" in the "settings".
Here you will find valuable information on which instruction can be used to adjust which property.
Change preview image size
If the size of the preview images is to be adjusted globally, the properties can be defined with the following code:
plugin.tx_news {
settings {
# --------------
# Detail
# --------------
detail {
# media configuration
media {
image {
# choose the rel tag like gallery[fo]
lightbox = lightbox[myImageSet]
maxWidth = 800
maxHeight = 600
}
}
}
# --------------
# List
# --------------
list {
# media configuration
media {
image {
maxWidth = 285
maxHeight = 186
}
dummyImage = typo3conf/ext/news/Resources/Public/Images/dummy-preview-image.png
}
}
}
}