[TYPO3] TemplaVoila and IMG_RESOURCE problem
Peter Klein
peter at umloud.dk
Mon May 14 10:31:46 CEST 2007
Hi George. Try changing the line:
file.import.field = media
to:
file.import.data = pages:media
--
Peter Klein/Umloud Untd
"Georg Rehfeld" <georg.rehfeld at gmx.de> skrev i en meddelelse
news:mailman.215563.1178926685.21067.typo3-english at lists.netfielders.de...
> Hi group,
>
> using TV in Typo3 V4.1 I'm trying to set an inline
> style="background-image:url(uploads/media/<xyz.jpg>);" but only get
> style="background-image:url();"
>
> The essential template setup is as follows:
>
> ----- snip -----
> ### get first picture from the media field
> temp.bild_b1 = IMG_RESOURCE
> temp.bild_b1 {
> file.import = uploads/media/
> file.import.field = media
> file.import.listNum = 0
> stdWrap.wrap = background-image:url( | );
> }
>
> lib.bild_b1 < temp.bild_b1
>
> page = PAGE
> page.typeNum = 0
> page.10 = USER
> page.10.userFunc = tx_templavoila_pi1->main_page
> ----- snap -----
>
> The regarding TV DS XML is:
>
> ----- snip -----
> <field_b1 type="array">
> <type>attr</type>
> <tx_templavoila type="array">
> <title>Bild 1</title>
> <sample_data type="array">
> <numIndex index="0"></numIndex>
> </sample_data>
> <eType>TypoScriptObject</eType>
> <eType_EXTRA type="array">
> <objPath>lib.bild_b1</objPath>
> </eType_EXTRA>
> <TypoScriptObjPath>lib.bild_b1</TypoScriptObjPath>
> <description>a.b1 style-Attribut</description>
> </tx_templavoila>
> </field_b1>
> ----- snap -----
>
> The mapping in the TO is set to the attribute 'style' and up to date,
> but the generated HTML output is only:
>
> ----- snip -----
> style="background-image:url();"
> ----- snap -----
>
>
> For testing purposes I added this template setup:
>
> ----- snip -----
> page.5 < lib.bild_b1
> ----- snap -----
>
> and get, directly after the <body> tag, a line:
>
> ----- snip -----
> background-image:url(uploads/media/garten04.jpg);
> ----- snap -----
>
>
> Conclusions:
>
> - my template setup for lib.bild_b1 is correct, as can be seen from
> the output of page.5, where the correct path to the image is spit
> out
>
> - my TV DS/TO/mapping seems to be OK: the wrap is generated and spit out
> in the correct place ... inside the quotes of the style attribute
>
>
> But why is the path to the picture missing, when lib.bild_b1 is used in
> TV as opposed to being correctly generated in page.5 ???
>
> Any help/hint is very welcome.
>
> Thanks for your time and efforts, Georg
> --
> ___ ___
> | + | |__ Georg Rehfeld Woltmanstr. 12 20097 Hamburg
> |_|_\ |___ georg.rehfeld.nospam at gmx.de +49 (40) 23 53 27 10
>
> (Delete .nospam from mail address)
More information about the TYPO3-english
mailing list