Jump to content

Customize BACK to All EVENTS URL

Recommended Posts

Posted

Site URL: http://https/www.scienceseeds.com/

We are testing events for registration and have a general event page here:

https://www.scienceseeds.com/workshops-march

I saw Tuan's posting customize-back-to-all about how to change the back to all events text and redirect it. That works great for this page.

However, we have a second page

https://www.scienceseeds.com/test1

that has a calendar and a list of upcoming events. When you click on the event in the calendar or the event listing you get the full event description. When you click on "Back to All Events" we would like to return to the Calendar page and not to the main event page.

Is it possible to redirect to the test1 page in this case?

Posted

Add to Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('.eventitem-backlink').attr('href','https://beaverhero.com');
});
</script>

Replace with new url

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

Tuan - thank you . I tried that but that replaces the URL everywhere to the backlink URL. I want to be able to selectively choose the backlink based on the page that preceded it.

Posted
On 3/22/2021 at 8:15 AM, MM1 said:

Tuan - thank you . I tried that but that replaces the URL everywhere to the backlink URL. I want to be able to selectively choose the backlink based on the page that preceded it.

Add this to page header (page where you want to change url)

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('.eventitem-backlink').attr('href','https://beaverhero.com');
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted

Hi Tuan,


That unfortunately doesn't work in this case. I need to capture the previous URL that got me to the events page and redirect to it. Is there a way to capture the window history and use that to set the backlink?

I have several paths that lead to the same events list so the backlink needs to remember the URL that got me there. The code above always sets the backlink to the same page.

Thanks!

Posted (edited)
Quote

I need to capture the previous URL that got me to the events page and redirect to it. Is there a way to capture the window history and use that to set the backlink?

In some cases yes. Unfortunately there are some circumstances where it won't work. Long story. Research on web if you are interested.

Please see Event Back to All Events Link Change.

Let us know how it goes.

Edited by creedon

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

  • 1 year later...
Posted

Hello!

Would anyone be able to help us out in this same scenario?

We would like the "Back to All Events" link inside an event to return back to our calendar page named /meetings-events

Our site is not live yet, does this matter?

Any help would be appreciated!
Thanks!
AJ

Screen Shot 2023-03-22 at 5.40.53 PM.png

Posted
22 minutes ago, SaeterConsulting said:

Our site is not live yet, does this matter?

Please post the URL for a page on your site where we can see your issue.

A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site.

Please read the site-wide password and how to share a link documentation to understand how they work.

We can then take a look at your issue.

You may find How to post a forum question post useful.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Posted

Site-wide password: Y3ll0w@731k

https://quillfish-flamingo-fcz2.squarespace.com/calendar

From the Calendar page, the user clicks on the March 15th event to view the event's details.

Inside that event, they want to return to the same Calendar page to look at more events so they click the "Back to All Events" text button, but instead it sends them to the Events page (where the list of events is housed and used to populate the Calendar).

When the user clicks on the "Back to Events" text button we would like them to return back to the Calendar page.

Could anyone explain how to change the link in the "Back to Events" text button?

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.