[TYPO3-dam] New extension "damlightbox" - sounds interessting?

Torsten Schrade schradt at uni-mainz.de
Thu Mar 27 14:39:36 CET 2008


Hi Ron,

First of all thank you very much for your patience and great effort in 
testing damlightbox! This will really improve its functionality.

I've got the culprit for the bug :) It's indeed the CONTENT object 
that's responsible for executing the lightbox template. CONTENT objects 
always base their query on the current page unless some other page is 
specified in .pidInList! So in your case the query ends up empty since 
your CEs are on another page.

Now we have a problem (and a solution): We cannot use .pidInList in a 
flexible way unless we would use another parameter in the image links - 
and even then I'm not sure if this would work...

BUT: We can change the CONTENT object to a RECORD object. Those are not 
bound to the current page. Do it like this:

damlightbox.10.10 = RECORDS
damlightbox.10.10 {
	source.data = GPvar:content
	tables = tt_content
	conf.tt_content < damlightbox.10.10.renderObj
	conf.tt_content.5.select.whereClause = AND 
tt_content.uid={GPvar:content} AND tx_dam_mm_ref.tablenames LIKE 
'tt_content'
	renderObj >
	dontCheckPid = 1
	table >
	select >
}

This works in my test setting and I'm quite certain that it will work 
for you as well. But before this fix can go into the next release I 
have to test if it's really a general solution.

> By the way, how do you set the <title>-tag in the opening lightbox 

You were very close: Only "value.cObject..." is wrong. "value" in a TEXT 
object has no stdWrap. Just insert it directly:

damlightbox.headerData.100 = TEXT
damlightbox.headerData.100 {
	cObject < temp.getDAMvalues
	cObject.cObject.value = 
TSFE:register|tx_damlightbox|metaData|{register:currentImg}|title
	wrap = <title>|</title>
}

The technique behind temp.getDAMvalues is to use a chain of .cObjects 
within a TEXT object to dynamically build and return the TS string to 
access the correct GLOBAL register that holds the DAM metadata of the 
current image.

> Why do you set:
> damlightbox.config.no_cache = 1
> - is caching bad for damlightbox?

If TYPO3 caches the lightbox page the display of multiple images within 
one lightbox will stop working - it will always show the first image and 
it's metadata.

> 
> I would suggest to include the realUrl settings as example in the manual 
> of the next version:

+1

> I would offer to extend the manual for the next version with some 
> examples and further explanation.

That would be absolutely brilliant! Please do and take your time. I will 
not be able to finish a new release before next week. You can send me 
the modified manual when you're ready and I will include it with a big 
thank you :)

Cheers,
Torsten




More information about the TYPO3-project-dam mailing list