[TYPO3] stupid question

Martin Kindler kindlerm at arcor.de
Wed Aug 30 16:24:03 CEST 2006


Francois, merci!

I just stumbled over the import property just after I posted :-)

But it still does not work. I have now the following TS code in my template:

tt_content.textpic.20 >
tt_content.textpic.20 = IMAGE
tt_content.textpic.20 {
	file.import = fileadmin/user_upload/
	file.import.field = image
	file.import.listNum = 0
	file.width = 120
	wrap = <div class="c_img">|</div>
}

This does not work, while the following, where I just use the full path of
the image, works

tt_content.textpic.20 >
tt_content.textpic.20 = IMAGE
tt_content.textpic.20 {
	file = fileadmin/user_upload/foo.jpg
	file.width = 120
	wrap = <div class="c_img">|</div>
}

Martin

> -----Ursprüngliche Nachricht-----
> Von: Francois Suter [mailto:fsuter at cobweb.ch]
> Gesendet: Mittwoch, 30. August 2006 14:53
> An: kindlerm at acm.org; TYPO3 English
> Betreff: Re: [TYPO3] stupid question
> 
> 
> Hi,
> 
> > Hi all,
> >
> > this should be trivial, but I have been trying and googling all day 
> > and do not find a solution.
> >
> > I simply want to have the image of a textpic content element (i. e. 
> > the image stored in a record of type textpic in tt_content)to be
> > rendered as an
> > IMAGE content object.
> >
> > I have something like
> > page.20 = IMAGE
> > page.20.file = ???? How to get a field here??? page.20.width = 
> > <something>
> 
> Well, you could use the CONTENT cObject to fetch the record.
> 
> As for the IMAGE cObject I'm not entirely sure, but since the file
> property is an imgResource and the imgResource function has a  
> property called import which is itself a stdWrap function, it should  
> be possible to work something out, along the lines of:
> 
> page.20.file.import.field = textpic
> 
> or with the data property, which is a getText function, opening up
> other possibilities.
> 
> HTH
> 
> François Suter
> Directeur technique
> -----------------------------------------------------
> Cobweb Development Sàrl
> www.cobweb.ch
> -----------------------------------------------------
> 
> 




More information about the TYPO3-english mailing list