Jump to content

Is there a way to add custom code to a url with a search by tag?

Recommended Posts

Site URL: https://www.soulandfineart.com/

SS 7.1 fluid

pw: Art-is-Joyful

here is the problem I am trying to solve.  I have a two pages that in turn has a link to a blog with a tag 

example https://www.soulandfineart.com/events?tag=test1     on my site its testpage1 and test page 2

when i click on the link i get a dynamic list of entries with the "test1" tag. 

I want to inject a link in this page to send me back to the document.referrer page 

that way if I came from test page2 and hit the return link i'd go back to test page 2

but if i got the list via test page 1 id return to test page1. 

I managed to get the individual pages to go back to the original search like this

<a id="link">return</a>
   var scrt_var = document.referrer;

I just need a way to inject the same thing into the list returned by https://www.soulandfineart.com/events?tag=test1 

Here is what i'm trying to say:   or if there is a better method for doing this I welcome the suggestion 

thanks for your time, 




Link to comment
  • Replies 3
  • Views 213
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • 3 weeks later...

I have not found a way to do this. as a workaround I had to place each image on its own page. This is a bit painful because i have a lot of pictures so each picture resides on its own page with all its details  ( picture, artist, description, ect ) and i have wrote a java script to create a link back from the page they got to artwork page. since I have multiple paths to any individual painting I pass the collection name and the return anchor ( with 30+ pics i needed to allow users to go back to the exact place they were because if you are on mobile and you return to the top of the page instead of the pic you were looking at say 15 pictures down on the page )  the script then takes the gallery name and return anchor and creates a link back to that page. it also fails gracefully  if one or more of the two parameters are not passed. 

Link to comment

Create an account or sign in to comment

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

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.