- Issue created by @marcoka
- 🇩🇪Germany marcoka
I did use views "custom rewrite field" to build the markup myself. That works.
- 🇩🇪Germany marcoka
Hi. Thats a bit complex. I rewrote the image fields and added a custom textfield.
Also activate global script include in the settings and added a class to the view. "photoswipe-gallery"image
<a class="photoswipe" href= "{{ field_media_image }}" itemprop="contentUrl" data-pswp-width="{{ field_media_image__width }}" data-pswp-height="{{ field_media_image__height }}" title="{{ field_media_image__title }}" alt="{{ field_media_image__title }}" data-overlay-title="{{ field_media_image__title }}">
custom textfield
<figure itemprop="associatedMedia" itemscope itemtype="https://schema.org/ImageObject"> {{ field_media_image_1 }}{{ field_media_image }}{{ field_media_image_2 }}{{ field_media_image_3 }}</a> <figcaption itemprop="caption description pswp-caption-content">{{ field_media_image_4 }}{{ field_media_image_5 }}</figcaption> </figure>
That results in the following on my site:
https://www.kopfhoerer-berater.de/test/sony-wf-1000xm5-im-test#image-gal... - Status changed to Postponed: needs info
12 months ago 2:35pm 10 January 2024 - 🇩🇪Germany Grevil
Have you installed the "photoswipe_dynamic_caption" submodule? Since Photoswipe 5.x, different photoswipe functionalities were encapsulated in "photoswipe plugins" (see https://github.com/dimsemenov/photoswipe-dynamic-caption-plugin for example). This is represented through submodules in the Drupal module.
- 🇩🇪Germany marcoka
Yes i have. My solution also works and you can customize the code to be valid with the schema.org gallery template
- Status changed to Fixed
12 months ago 8:46am 15 January 2024 - 🇩🇪Germany Grevil
@marcoka, my apologies! Seems, that I haven't read the issue summary correctly!
Having a caption above the picture isn't currently supported, the caption "type" can currently be set to "below", "aside" or "auto", see https://github.com/dimsemenov/photoswipe-dynamic-caption-plugin#type-auto. Feel free to create an issue on @dimsemenov caption plugin repo.
Automatically closed - issue fixed for 2 weeks with no activity.