[TYPO3-mvc] viewHelper: ImageViewHelper - short question

Bastian Waidelich bastian at typo3.org
Wed May 20 11:41:29 CEST 2009


Susanne Moog wrote:

Hello Susanne,

> The image view helper expects the value of "width" and "height" to be
> strings (so you can enter 100px) whereas the maxWidth etc. is expected
> to be an integer.

Mhh, yes, that might be confusing..
width is actually not the width attribute of the resulting img tag. It 
is rather the with property of the underlying IMAGE cObject..
Have a look at the width parameter of the imgResource cObject:
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.1/view/1/5/#id4279433
you can append "m" or "c" to the value.. Or even write "100c+30"
The actual width attribute ("130px") is then generated by the view helper.

I can't really think of a better currently.. It probably just needs 
proper documentation. What do you think?

Thanks for the feedback, that's exactly the kind of information that we 
need to make it more stable and usable until the release!

Bastian


More information about the TYPO3-project-typo3v4mvc mailing list