genfoch01 Posted September 21, 2022 Share Posted September 21, 2022 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> <script> var scrt_var = document.referrer; document.getElementById("link").setAttribute("href",scrt_var); </script> 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, John Link to comment
Wolfsilon Posted September 21, 2022 Share Posted September 21, 2022 Oof! My immediate instinct is to say that you'd want to use some type of conditional script to determine when to execute the code depending based on the location or destination. However, there's probably a less tedious and more stable way to accomplish this, especially given SQS's finicky loading system. Link to comment
genfoch01 Posted September 21, 2022 Author Share Posted September 21, 2022 yeah I figured this would be a long shot. I also think that functionality would make a lot of folks happy. Link to comment
genfoch01 Posted October 13, 2022 Author Share Posted October 13, 2022 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment