[TYPO3] RandomImage-Call with TypoScript

Tobias Graf tobias.graf at bluewin.ch
Thu Jul 20 13:41:08 CEST 2006


Hello everybody

I use Typo3 4.0 with TemplaVoila and mapped a div-tag to lib.image. Now, 
I installed the extension wag_randomimage which is working fine, if I 
add a new content element to a page and select Insert Plugin > Random 
Image ...

But I would like to call generate this random image in the setupfield of 
my template, where I wrote the following code:

************************************
includeLibs.tx_wagrandomimage = 
EXT:wag_randomimage/pi1/class.tx_wagrandomimage_pi1.php

lib.image = USER_INT
lib.image.userFunc = tx_wagrandomimage_pi1->main
************************************

This code generates the following output (in the frontend):

************************************
<!--
BEGIN: Content of extension "wag_randomimage", plugin 
"tx_wagrandomimage_pi1"
-->

<div class="tx-wagrandomimage-pi1">

</div>

<!--
END: Content of extension "wag_randomimage", plugin "tx_wagrandomimage_pi1"
-->
************************************

The image (<img src="path/to/image"> is supposed to show up inside the 
div-tag. But it is missing (if I call the plugin with TypoScript).

Could someone tell me either, what is wrong with my configuration 
(setup-field or elsewhere)

OR(!)

how, I can call a content element from the setup-field. Something like

************************************
lib.image = ELEMENT
lib.image.id = 88

************************************



More information about the TYPO3-english mailing list