Back to Previous Page Dynamic Text

Does anyone know how to create this " ← Tours Departing From Hollywood" link in Webflow? Any time you change pages it changes the text to the previous page you were on. I have the script to create a go back button, but I’m not sure how to do the text part. I like this better than “Return to previous page” or “Go back”

Also - I know how do do it with CMS, but I’d really like it to work for any of the pages on the site

Is there no possibility you could use the CMS to accomplish this effect site-wide, as you noted?

No, my bigger issue is that the products have a multi-reference field for the product category because some of them belong to more than one. Because of this, I can’t make a proper breadcrumb navigation because I can’t select that reference field text. The only solution to that would be to duplicate the product in the CMS which seems kind of silly, but might be my only option

Up to how many different product categories does any given product exist in? Also, can you share a preview link?

Hey there - sorry late in replying. There are not many products that reside in multiple categories, but there’s a handful that has 3 categories. I have not input all the products yet because I want to be sure it’s set up properly before moving forward with 100 of them, but you can still see what I’m trying to do.

So for example, this is the chakra sets category that houses 5 types of products:

Then once you click view product information on one of them, that takes you to the product page, this is where the breadcrumbs break because the category is a multi-reference field. Does that make sense? I feel like I’m explaining this terribly, but the preview link is also below so you can see what I mean hopefully!

This makes sense. I’ve encountered this same exact issue in the past where I was unable to utilize the multi-reference field in this way and it caused me a lot of stress. Here’s what I remember (just about all I can share):

I believe I manually re-created the multi-reference fields in each entry which allowed me to reference them freely. I added the name of the parent category as a text field and a link to the parent category as a link. This can be repeated 2 or 3 times. Please note: I do not have the bandwidth to test if these can be referenced in the CMS as expected, but I don’t immediately see why it would not work.

I believe this would be less time consuming than totally duplicating the products across each CMS category (fewer fields to enter). Further, if you need to make edits to one product in the future you will save yourself a lot of headache from having to remember to make changes across the clones. Then, there’s the question of how SEO would handle All in all I highly recommend not duplicating the product pages if you don’t need to.

If referencing 1 of the multiple parent categories proves impossible, I recommend you break from the breadcrumb approach and simply list all of the categories each product appears in on all pages, for consistency. This lets you display the information you want without the multi-reference headache IMO.

Finally, another option is to just evaluate the time/value trade-off of using a generic word such as “Go Back” or “Category” and proceed with that… The user experience of seeing the category name may not ultimately be worth the stress here. I think the site would still work great even if it said Go Back.

Anyone with more experience please feel free to chime in or correct my thinking here.


@allykat87 I haven’t played with Webflow’s new multi-reference CMS sorting feature yet, but now you might be able to accomplish your desired effect: Filter collection lists by multi-reference fields on template pages | Webflow Features


1 Like

Yes I saw that - great timing! Thanks for checking back in!! I think we got it all squared away :slight_smile: Just waiting for the client to return from her two-month vacation now, haha :slight_smile:

1 Like