0

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.

Charles Brunet
  • 21,797
  • 24
  • 83
  • 124

3 Answers3

1

It should work with this:

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

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
}
maholtz
  • 3,631
  • 1
  • 17
  • 17
  • Well. It was a typo transcribing the code. Thank you for pointing this. There is a dot there, but it doesn't display the image. – Charles Brunet Jul 18 '12 at 12:12
0

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 = |
    }
}