Jump to content

Photoswipe: how to add page title from each children page in a gallery?


rainx
 Share

Recommended Posts

Hi there,

I am not yet familiar with PW. With the PhotoSwipe module I managed to build a gallery with images from children pages of the gallery page. However, the page titles of the children pages are not included in the HTML. I tried several things but cannot find out how to get the page titles appear. The page title should either appear in the <figure> or <figurecaption> tag.

Can someone help?

Thanks

Link to comment
Share on other sites

Hello and welcome to the forum!

your question is related to a 3rd party module https://processwire.com/modules/markup-processwire-photoswipe/ 

On the module page you can see a link "Support" which links to the dedicated forum thread for that module.

You might want to ask your question there.

Besides that, the module has last been updated 6 years ago. So it uses an old version of the https://photoswipe.com/ script and might not be compatible with the latest ProcessWire version.

In general, 3rd party modules are maintained by their authors and it is up to them whether they update them and offer support. It is up to youwhether you want to use and rely on a module with outdated code.

After having a quick look at the module code, there is no easy way of bringing in the page title into the markup  through the available render options. Like stated in the module documentation, you would have to extend the MarkupPwpswpGallery class. Alternatively you could edit the module code directly to achieve what you want. For a start have a look at https://github.com/blynx/MarkupProcesswirePhotoswipe/blob/a7c495964262f30eb28e891437665913ea5c5164/MarkupPwpswpGallery.module#L162 following and https://github.com/blynx/MarkupProcesswirePhotoswipe/blob/a7c495964262f30eb28e891437665913ea5c5164/MarkupPwpswpGallery.module#L196 following.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...