Translations
Info
All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh

TSref/IMAGE

From TYPO3Wiki
Jump to: navigation, search

Tags: TypoScript

This page is document in progress.



IMAGE

PHP function: $cObj->cImage()


$GLOBALS['TSFE']->lastImageInfo contains the array (with width, height and so on) returned by getimagesize() for the new image (if any).

Note There is a different IMAGE-Object in the GIFBUILDER context. It is not the same object!


Property: Data type: Description: Default:

file


imgResource



-


params


<IMG>-params



-


border


integer


Value of the “border” attribute of the image tag.


0 -


altText
titleText
alttext


string / stdWrap


If no titletext is specified, it will use the alttext instead. If no alttext is specified, it will use an empty alttext.


("alttext" is the old spelling of this attribute. It will be used only if "altText" does not specify a value or properties.)


-


emptyTitleHandling
string
How the 'title' attribute will be handled if no title is given for an image. Possible choices: "keepEmpty", "useAlt" or "removeAttr". Recommended for accessibility is "removeAttr". For correct tooltips on IE, use "keepEmpty". For previous TYPO3 behaviour, use "useAlt".
useAlt

longdescURL


string / stdWrap


"longdesc" attribute (URL pointing to document with extensive details about image).


-


linkWrap


linkWrap


(before ".wrap")


-




imageLinkWrap


boolean / imageLinkWrap


NOTE: Only active if linkWrap is not set and file is not GIFBUILDER (as it works with the original imagefile).


-




if


if


When "if" returns false, the image is not shown.


-


wrap


wrap



-


stdWrap


stdWrap



-




[tsref:(cObject).IMAGE]


Example

TS TypoScript:
 # Example:
 10 = IMAGE 
 10.file = toplogo*.gif
 10.params = hspace=5
 10.wrap = |
 
 # Link to page with id 1
 10.stdWrap.typolink.parameter = 1
 
 
 # Image in the link
 10 = TEXT
 10 {
   typolink.parameter = 10
   stdWrap.prepend = IMAGE
   stdWrap.prepend.file = fileadmin/template/image.gif
   field = title
 }

Related Objects

IMG_RESOURCE returns only the file path of the (possibly resized) image. Useful for CSS, JavaScript and Flash parameters.

Go to: typo3.org    
Login, and you can edit.
Personal tools
Namespaces

Variants
Actions