[TYPO3-ttnews] multiline imagecaption possible? with the same width as the image it belongs to

Andreas Kießling andreas.kiessling at web.de
Fri Dec 8 20:01:12 CET 2006


Hi,

is it possible to display the caption for images (in single-view) with 
the same width as the image it belongs to?
I have images with different sizes, so they are not all scaled to the 
same width. Otherwise i could put the width directly in the css.

As far as i've read through the IMAGE and the cImage function in 
class.tslib_content.php, the width is directly inserted to the tag with 
no chance to reuse it anywhere else. Some inline-code would be very nice 
to have the caption displayed like this:

<p class="news-single-imgcaption" style="widthofimage;">Caption</p>

I thought about a customized imageMarkerFunc, but i don't know, how to 
extract the width from the imagestring, and to insert it in the caption. 
Can this be done by a regular expression?
Like searching through the tag that is returned from 
$this->local_cObj->IMAGE($lConf['image.'])

Regards,
Andreas


More information about the TYPO3-project-tt-news mailing list