Hello!

Is it somehow possible to display the grid similar to the first example shown here?
On this place i also found a script which is providing the basic feature.

The feature would be: Show a given Number/amount of images. If we have more than "given number" show the "more pictures inkl. number" link on the last image. The lightbox should switch through all of them.

best regards
David

Comments

runzipel created an issue. See original summary.

runzipel’s picture

Issue summary: View changes
gausarts’s picture

IMHO, yes.

Untested, but perhaps like this:

  • Designate gridstack like the sample, says 5 visible boxes.
  • Starting after the last visible box (5), add 1x1 grid as many as possible to accommodate dynamic amount.
  • Choose relevant lightboxes.
  • Use CSS to hide the 6-N grids, I don't remember the exact CSS classes, but like this:
    .gridstack--facebook--optionset .box--5 ~ .box {
      display: none;
     }
    

Select the optionset at formatters, or views.

To input "View all N images", use MYTHEME_preprocess_gridstack_box() with quasi-code:

If settings.delta == 4
variables caption.data.cta = 'View all settings.count images'

Check the correct variables and syntax, might be wrong.

Be informed, please use 2.7 if the latest 2.8 has issues. 2.7 is more stable, although a bit outdated. Likely 2.8 is broken somewhere when I updated to the latest library version.

Let me know how you come up.

Cheers :)