I have several portfolio pages. All of the items featured in these portfolios use the same template for their detail pages. The detail page has a back button, and we want that button to take people back to the portfolio page they came from. But items can appear in multiple portfolios. I need a way to tell the detail template what portfolio page the user came from.
Originally I wanted to use a query string in the url, so clicking an item on a portfolio page would take you to “domain/item/?portfolio=1” but I can’t figure out how to get the query string in my template so I could add that information to the back button. Is there a way to grab a query string in hugo or is there a better way to pass information between pages?