[TYPO3-formidable] Template methods

Luc Muller luc-mailingtypo3 at ameos.com
Mon Dec 6 10:34:12 CET 2010


Hello Michael.

I think the first point is that using a recombine wasn't the good idea 
at start.

You'de better use à renderlet image and a renderlet link to achieve what 
you want.

Basically having a picture with a link on it.

This is how it can be done :

First Generating the Image :

<column name="file" type="renderlet:IMAGE">
	<path exec="cb.getFondFilePath()" />
		<imageconf>
			<userobj>
				<ts><![CDATA[
					10 < config.tx_ameosformidable.res.shared.xml.imageprocess.maxwh
					10.file.10.file < params.relwebpath
					10.file.10.file.maxH = 100
					10.file.10.file.maxW = 100

				]]></ts>
			</userobj>
		</imageconf>
</column>

This is going to renderder an image width MaxH and MaxW use the 
typoscript you want instead.

after that you should add the renderlet link :

<column name="link" type="renderlet:LINK" label="LLL:agrandir.label">
	<target>_blank</target>
	<url exec="cb.getFondUrl()" />
</column>

see the url tag where you render the url that is going to be used on 
your image.

After that in you're template simply use : 
{link.tag.begin}{file}{link.tag.end}

not sure about the syntax right now. but try a link.debug() and 
file.debug() to see what you can output.

To learn more about CodeBehind see : 
http://formidable.typo3.ug/features/codebehind-syntax.html

Hope this Helps.

Luc Muller.

P.S. : do not hesitate to ask if you got any other questions.

Le 03/12/2010 20:25, Michael Paffrath a écrit :
> Good evening everybody,
>
> i have a general understanding problem and i hope that you can help me.
>
> Using formidable version 1.1.373
> In a listing i am also showing images. To manipulate these images i use
> this code:
> <column name="bigphoto" type="renderlet:TEXT" listHeader="">
> <recombine>
> <userobj>
> <php><![CDATA[/*<?*/
> $aRowData = $this->oDataHandler->_getListData();
> $image = explode(",",$aRowData['photo']);
> $path = "uploads/tx_myext/";
> return '<a href="#"
> class="storypicture"/>'.$this->oSandBox->getImage($path.$image[0],300,500).'</a>';
>
> /*?>*/]]></php>
> </userobj>
> </recombine>
> </column>
>
> The function in the sandbox renders a temp-image for me.
>
> Now when i´m using the same code with formidable version 2.0.421 i get
> the error:
> [bigphoto] /recombine is deprecated. You should use template methods
> instead
>
> How can i use the template methods to get the same result as above?
>
> Have a nice weekend,
> Michael



More information about the TYPO3-project-formidable mailing list