0
votes

In tt_news, how can I display a default image when there are no images associated with the news? I tried

plugin.tt_news.displaySingle.image.noImage_stdWrap.cObject = IMAGE
plugin.tt_news.displaySingle.image.noImage_stdWrap.cObject {
  wrap =
  file = fileadmin/images/image.jpg
}

but it doesn't display the image.

3
What is that mean "with no success"? Doesn't it react anyway on your TS changes?biesior
I precised the question.Charles Brunet

3 Answers

1
votes

It should work with this:

plugin.tt_news.displaySingle.image.noImage_stdWrap {
    cObject = IMAGE
    cObject {
        file = fileadmin/news-image-default.jpg
        wrap =
    }
}
0
votes

i guess there is a dot between "displaySingle" and "image" missing?

plugin.tt_news.displaySingle.image.noImage_stdWrap.cObject = IMAGE
plugin.tt_news.displaySingle.image.noImage_stdWrap.cObject {
  file = fileadmin/images/image.jpg
}
0
votes

This code works for me. Path to file must be correct and image file must exists otherwise Typo don't display anything.

plugin.tt_news.displaySingle.image.noImage_stdWrap {
    cObject = IMAGE
    cObject {
        file = fileadmin/tt_news/default_image.jpg
        wrap = |
    }
}