[TYPO3-ttnews] Render news image as css background image

"Jörg Wagner (Digilog multimedia)" jwagner at digilog.de
Thu Jun 6 17:59:25 CEST 2013


Hi Sascha,

there is a little flaw in your code:
listNum must also be prepended with import.:

     displayList {
          content_stdWrap.postUserFunc = tx_pmkhtmlcrop->htmlCrop
          content_stdWrap.cropHtml = 300 | ... | 1
          content_stdWrap.parseFunc < lib.parseFunc_RTE
          image >
          image.stdWrap.cObject = IMG_RESOURCE
         image.stdWrap.cObject {
             file {
                 import.field = image
                 import = uploads/pics/
                 import.listNum = 0
                 maxW = 303
                 maxH = 215
             }
         }
     }
Please also edit your snippet at...
http://typo3.org/documentation/snippets/sd/268/
...it contains the same error.

Cheers, Jörg.



Am 16.09.2010 02:38, schrieb Sacha Vorbeck:
> On 16.09.2010 02:17, Sacha Vorbeck wrote:
>> Hi,
>>
>> I`d like to display the images in a news list view as CSS-background
>> images like this:
>> <div style="background: url('image.jpg';)">
>> <h1>Title</h1>
>> <h2>Subheader</h2>
>> </div>
>
> got it:
>
>      displayList {
>           content_stdWrap.postUserFunc = tx_pmkhtmlcrop->htmlCrop
>           content_stdWrap.cropHtml = 300 | ... | 1
>           content_stdWrap.parseFunc < lib.parseFunc_RTE
>           image >
>           image.stdWrap.cObject = IMG_RESOURCE
>          image.stdWrap.cObject {
>              file {
>                  import.field = image
>                  import = uploads/pics/
>                  listNum = 0
>                  maxW = 303
>                  maxH = 215
>              }
>          }
>      }
>
> thanks for listening ;-).
>



More information about the TYPO3-project-tt-news mailing list