How to set "go to top" button in CMS template?

Hi Webflow support,

I’ve just pulled off kind of a workaround and I’m not sure if it’s the actual solution, or if I’ve just fixed something while complicating something else.

What I was trying to achieve (and what I suppose I have achieved now) is getting the “go back to top of page” arrow in the footer of the website (which is on every page of the site and works on every other page) to work on our “News Template” CMS Collection template page.

While looking for a solution, I found this thread: How to link to a section within a CMS item (blog posts) and it talked about making an entire table of contents section for every blog post using Javascript and Jquery… Not quite what I was looking for. All I want is for the up-arrow in the footer to take you to the top of each individual blog post page. So I ended up finding this: Link field | Webflow University

The solution that I pried from that Webflow University article is to simply add a new field to the “News” CMS Collection, called “Top of page URL” and filled in the field on each of the blog posts with https://[url]/[slug]#header. I then put in a small description to help the non-tech-savvy client make sure that the field is filled out on each new blog post, and obviously linked the go-to-top arrow on the “News” Template page to that custom field using link settings.

This fixed the problem, but I’m curious: Is there a way to do this that DOESN’T require the client to fill out an extra field? Is there a simpler solution that I missed, or perhaps a code-heavy solution that will make creating new blog posts less confusing for the client? Please let me know, and thank you for reading.


Here is my site Read-Only: [LINK]
(how to share your site Read-Only link)

Hi @LewisMarmoset creating GO TO TOP button is in WF very simple task and once is set in your template layout your client doesn’t need to do anything. I have recorded short video about how to.

Hope this will help you solve your request.

NOTE: I see lots of forum members have an issue with “go to section” to end up in wrong position. This can be solved several ways (techniques) and here on forum is many solved request related to this issue so feel free to use advanced search filter to find request that can help you if you will face similar issue.

Hi Stan,

What you’ve described in your video is the first thing I tried, which redirects people from the blog post (or any CMS item or individual page) to the instance of that section on the homepage. I tried it again just to make sure, and I found that it works in preview mode, but doesn’t work on the actual live site (once again, it takes the user straight to the top of the homepage instead).

I ran into the same problem with every page other than the homepage, where the section link takes people straight back to the homepage, and I bypassed it by manually filling in the URL (under link settings) to https://[url]/[slug]#header. The solution that bypassed this problem for the individual blog posts was – as I explained in the opener – basically the same method but instead of manually filling in the URL, I pulled in a new, unique field made for the “news” CMS collection. Each blog post has that field filled out as the full URL followed by #header. The field gets pulled in by the news item CMS template page, within the link block in the footer, using the purple “Get URL from News” block under link settings.

Based on your response, I’m guessing that the problem I’ve encountered (with the “section link” feature only working properly on the homepage) is very uncommon. Do you or does anyone else know why this feature that should be working is taking people straight to the homepage?

Hi @LewisMarmoset to make sure you understand that you do not need URL link field in your News collection I have made another video that will hopefully clear some questions you had.

Okay, here’s the thing: I’ve already said that the standard method (which, once again, is the first thing i tried) doesn’t work on the site. It works in the preview, yes, but not the live site. The standard dropdown link to section method is the first thing I tried. If someone could get back to me and start explaining what’s wrong with our version of Webflow instead of telling me what I already know, that would be really, really great.

Some little bits of helpful context:

  • I didn’t create this site, and I don’t normally work in Webflow. We took control of the site in March 2021.

  • When I say “that’s the first thing I tried,” I meant I first tried this about a year ago, when all anchor-based links mysteriously started directing people to the homepage. Everything was set up and working, and then all of a sudden all anchor-based links outside of the homepage would redirect people to that section of the homepage.

  • ALL anchor links that aren’t on the homepage are set up manually to link to https://[url]/[slug]#[section]. This was the only way I could get it to work. The standard section link method works in preview mode but not on the live site.

I don’t know how much more I can state that there is something wrong with our version of webflow; that is what needs to be addressed here. The manual workaround that I’ve put in place is out of necessity, not out of ignorance. Seriously, please let the next reply to this topic not be someone assuming I’m missing something incredibly obvious. You really, really don’t need to make another 5 minute video explaining stuff that I already know.

I’ve made a 4-minute video to explain the problem as precisely as I can:

Again, I’m looking for some clarification as to what is wrong with our version of Webflow. The simple solution – that I was wholly aware of a year ago – does not work. It redirects people to the instance of that section on the homepage. It works in preview mode, but not on the live site. If any part of this situation is unclear to you, watch the video again until you comprehend what I’m saying, or simply don’t reply.

Thanks for your time.

No problem and I’m very sorry if my responses offended you. In the case that standard settings of this GO TOP TOP doesn’t work for you and you need explain what is wrong with your WF VERSION I will suggest contacting WF support.

Have a good one

Hi Stan,

Sincerely, thanks for trying to help and I’m sorry for getting so upset. I have some stuff going on right now that is making me very short with people. Genuinely, I got way too angry about all this (especially now that this issue has been present for over a year) and taking it out on you was uncalled for. Feel free to lock the thread or whatever is necessary. I’ll contact support and see if I can get the underlying problem fixed.

Thanks again for your time.