[英]tt_news default news image based on category image
I'm using the extension tt_news at my TYPO3 installation to publish news. 我在TYPO3安装中使用扩展名tt_news来发布新闻。 Now I would like to have a default picture for a news, if no picture is set.
现在,如果没有设置图片,我想为新闻提供默认图片。 This default picture should depend on the category selected and the category image should be used.
此默认图片应取决于所选的类别,并且应使用类别图像。
At the moment, I only a have a default picture for every news. 目前,每个新闻我只有一张默认图片。 I realised it with the following TS:
我通过以下TS意识到了这一点:
displayLatest.image.noImage_stdWrap {
cObject = IMAGE
cObject {
file = fileadmin/default-pic.jpg
wrap =
}
}
How can I adopt this to use the category image? 如何使用此图像来使用类别图像?
You could use the other news extension "news". 您可以使用其他新闻扩展“ news”。 It has a FLUID template.
它具有一个FLUID模板。 You can program the code inside the html code so to show a default picture according the category value.
您可以在html代码中对代码进行编程,以便根据类别值显示默认图片。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.