Can a repeater link to a new page AND sort a database?

This might seem like an odd question, but I have a portfolio site where you can click an image in a gallery that is linked to a database and it opens the project in a dynamic page. Is there any way that I can link back from the dynamic page back to the gallery and maintain the filter?
As an example, from the dynamic page, if you select the “Hospitality” repeater, if would send you back to the main gallery and filter all projects to those labeled 'Hospitality" in the database.
Right now I just have the repeaters as buttons that are disabled, with a back button.

Hi,
You can save gallery items into the storage and simply link back o the page with the gallery. And on the page load, get the items from the storage .
E.g. the flow:

  • The user opens the gallery page.

  • If nothing is in the storage, the default items are shown in the gallery.

  • If there are items in the storage, they are shown.

  • When the user clicks to direct to a dynamic page, items are saved into the storage.