Home Forums Particles Support Card Particle – image in lightcase modal Reply To: Card Particle – image in lightcase modal


Jay
Subscriber

For the lightcase I added a checkbox to the YAML:

image_lightcase:
              type: input.checkbox
              label: Image Lightcase
              description: Shows image in a lightcase modal.
              overridable: false
              default: false

And the following to the twig before the image:

{% if particle.image_lightcase == '1' %}<a href="{{ particle.image|e }}" data-rel="lightcase">{% endif %}

After the image:

{% if particle.image_lightcase == '1' %}</a>{% endif %}

Let me know if there is a better or more universal way!

Thanks
Jay

  • This reply was modified 3 years, 8 months ago by Jay.
JoomLead Gantry 5 particles 2.2.0 released, new features and bug fixes Changelog
Cyber Monday is finally here! Save 30% OFF everything. Use promo code: 30OFFCM Shop Now