Bug #75408
closedLightbox rel="" attribute pointing to the PID instead of the Contentobjects UID
0%
Description
By default the FSC constant styles.content.textmedia.linkWrap.lightboxRelAttribute has this value: lightbox[{field:uid}]
In the MediaGallery.html Partial of FSC the clickEnlarge ViewHelper is called to render the link around the image:
<ce:link.clickEnlarge image="{column.media}" configuration="{settings.media.popup}">
The ClickEnlargeViewhelper of FSC will now render the default dataWrap of FSC using the ContentObjectRenderer. The cObjRenderer will parse {field:uid} to the UID of the current Page and NOT the UID of the current Content Objects. This will make it difficult to seperate multiple gallerys on one page.
SOLUTION
Bind a "current" argument to the ViewHelper to provide the ContentObject UID.
In ClickEnlargeViewHelper.php
Add
$this->registerArgument('current', 'integer', 'The Content Object UID', false);
To the initializeArguments() function.
Then add this to the renderStatic() function:
if (isset($arguments['current'])) { self::getContentObjectRenderer()->setCurrentVal($arguments['current']); }
Now call the ViewHelper like this:
<ce:link.clickEnlarge image="{column.media}" configuration="{settings.media.popup}" current="{data.uid}">
And change the constant to lightbox[{current}]