Today I'd like to share a very simple trick which seems a bit underrepresentated in the documentation of jquery.photoswipe (built on Photoswipe): How to simply provide a photoswipe gallery function using the following class based markup:

Use case / example:

Several times in the last months we had the requirement to prepopulate a Drupal 8 webform with a parent entity ID from the URL. For example we had forms to register for events which we embedded on the node page as paragraphs or blocks and wanted to set an entity reference field to the node ID programmatically.