[TYPO3-mvc] viewHelper: ImageViewHelper - short question

Susanne Moog typo3 at susannemoog.de
Wed May 20 11:57:49 CEST 2009


Hey Bastian,

Bastian Waidelich schrieb:
> Susanne Moog wrote:
>> 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.

Ah, it does more than I realized, that's great.

> I can't really think of a better currently.. It probably just needs
> proper documentation. What do you think?
> 
I think that there is a valid reason for the difference, so the proper
documentation is surely enough. If I had a closer look to the function
itself I would probably have noticed it, too :-)

Cheers!

Susanne

-- 
Susanne Moog
NEUSTA GmbH - www.neusta.de


More information about the TYPO3-project-typo3v4mvc mailing list