[TYPO3] Is it possible to change the img tag?
Christopher Torgalson
bedlamhotel at gmail.com
Fri May 30 10:53:48 CEST 2008
Hi,
On Fri, May 30, 2008 at 10:40 AM, Pascal Cramer
<pascal at nospamroguesheep.nl> wrote:
> Goodmorning everyone,
>
> I am looking for a way to render an image (from an image element) as background
> of a div.
> My guess was there would be a wrap where the html of the img tag was defined.
> I've been searching the object browser, sysext\css_styled_content, newslists and
> Google but cannot find a solution or the location where Typo wraps the file
> reference with the img tag.
>
> So what I want is for:
> <img src="typo3temp/pics/af05f9bade.gif" width="120" height="90" alt="img2" />
> to become:
> <div style="background-image:url(typo3temp/pics/af05f9bade.gif)"></div>
>
> Now my questions are:
> where does Typo wrap the file ref/is it at all possible to change this?
> are there other/better ways of doing this?
All that searching and you missed the one authoritative Typoscript
reference: the TSref [1] :-)
You're looking for the IMG_RESOURCE cObject [2]. Note also that both
the IMG_RESOURCE and IMAGE cObjects populate the TSFE array with
information about the last rendered images--this info can be accessed
by Typoscript or by PHP scripts.
[1] http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/
[2] http://typo3.org/documentation/document-library/references/doc_core_tsref/current/view/8/7/
--
Christopher Torgalson
http://www.typo3apprentice.com/
More information about the TYPO3-english
mailing list