Veronica
Veronica

Reputation: 17

Lightbox TYPO3 Implementation doesn't work (without extension)

I tried implementing the lightbox2 into TYPO3 8.7.8 but it doesn't work (I'm not allowed to use extensions.

The lightbox.js and lightbox.css is correctly implemented. (They show up in the Developer Tools in Chrome)

I think the mistake is somewhere in the typoscript.

In my main Root template I put

tyles.content.imgtext.linkWrap {
    lightboxEnabled = 1
    width = 800
}


 tt_content.image.20.1.imageLinkWrap.linkParams.ATagParams.dataWrap = data - lightbox = "{field:uid}"

And in the config template I put

  noScaleUp = 1

Any help would be greatly appreciated Thanks!

Upvotes: 0

Views: 575

Answers (1)

Riccardo De Contardi
Riccardo De Contardi

Reputation: 2148

I assume that you are using fluid_styled_content;

This is the setup I used to make it work

1) I downloaded the files from http://lokeshdhakar.com/projects/lightbox2/ and put them under /fileadmin/ just for this test (but I suggest you to build your own frontend extension for that see for starting https://www.youtube.com/watch?v=HtBmim7pc0o)

2) TypoScript Setup

lib.contentElement.settings.media.popup.linkParams.ATagParams.dataWrap = class="" data-lightbox="lightbox-{field:uid}" 

page.includeCSS {
  file1 = fileadmin/lightbox.min.css
}

page.includeJSFooter {
   file1 = https://code.jquery.com/jquery-3.3.1.min.js
   file1.external = 1
   file1.forceOnTop = 1
   file2 = fileadmin/lightbox.min.js
}

Upvotes: 1

Related Questions