[TYPO3-english] Perfectlightbox captionSplit with tt_content images

Ronald Renfro rlr55555 at googlemail.com
Tue Nov 3 20:15:28 CET 2009


Hi,

I am having trouble configuring the perfectlightbox extension so that  
it displays the image captions when the lightbox. It show the enlarged  
image and the "1 of x images" but the caption is mising. CaptionSplit  
is working. The extension manual states that the caption field can be  
set via the constants {$plugin.perfectlightbox.captionField} and the  
typoscript code suggests that caption splitting should work out of the  
box. Could it be that caption splitting only works for tt_news content  
or has someone found a way to achieve captionSplit with normal Image/ 
Text content elements? Any help would be great!

Thanks,
Ronald


tt_content.image.20.1 {
	titleText.override.field = {$plugin.perfectlightbox.captionField}
	titleText.override.htmlSpecialChars = 1
	titleText.override.if.isTrue.field = tx_perfectlightbox_activate
	imageLinkWrap {	
		typolink {
			### Only split when links are set... otherwise lightbox will ONLY  
work for the first image...
			parameter.listNum.stdWrap.if.isTrue.field = image_link
				
			### This returns a link, pointing to the path + name of the  
original image / resized lightbox image (if maxH or maxW is reached)
			### Overriding ONLY when imagezoom AND lightbox are activated AND  
no link is set
			parameter.override.cObject = IMG_RESOURCE
			parameter.override.cObject.file.import.data = TSFE:lastImageInfo| 
origFile
			parameter.override.cObject.file.maxW =  
{$plugin.perfectlightbox.lightBoxMaxW}
			parameter.override.cObject.file.maxH =  
{$plugin.perfectlightbox.lightBoxMaxH}		
			parameter.override.if.isTrue.field = image_zoom
			parameter.override.if.isTrue.field = tx_perfectlightbox_activate
			parameter.override.if.isFalse.field = image_link

			#ATagParams.if.isTrue.field = image_zoom
			#ATagParams.if.isTrue.field = tx_perfectlightbox_activate
			#ATagParams.if.isFalse.field = image_link
			
			### Now the userfunc does the dirty work
			userFunc = tx_perfectlightbox->main
		}
	}
}


temp.imageLinkWrap = 1
temp.imageLinkWrap {
	enable = 1	
	typolink {
		
		### Note the names of the fields! They are different from the ones  
tt_content uses! (except imagecaption)
		title.field = imagecaption // imagealttext // imagetitletext
		title.split.token.char = 10
		### This works only with the imageMarkerFunc!
		title.split.returnKey.data = register : IMAGE_NUM_CURRENT
		title.htmlSpecialChars = 1
		
		parameter.cObject = IMG_RESOURCE
		parameter.cObject.file.import.data = TSFE:lastImageInfo|origFile
		parameter.cObject.file.maxW = {$plugin.perfectlightbox.lightBoxMaxW}
		parameter.cObject.file.maxH = {$plugin.perfectlightbox.lightBoxMaxH}		
		
		ATagParams = rel="lightbox[lb{field:uid}]"
		ATagParams.insertData = 1
	}
}





More information about the TYPO3-english mailing list