I have a homepage with a couple of sections (Clients, Business etc.) with anchor links to that particular section and another page that is a Contact us page. I am using the same menu template on both these pages.
When I am on a homepage and click on a certain menu item on that same page (for example Clients), it will scroll down smoothly and go to that section, no problems there.
However, if I'm on a Contact us page, clicking the menu item Clients won't take me anywhere. I suppose it's because it's another page and it needs a full URL to be able to go there, e.g. https://localhost/mypage#clients.
But if I use the full URL like this, then scrolling to that particular section from the homepage is not smooth anymore, it basically reloads it and then scrolls down to it.
Is there a way to prevent this behavior? To have 2 pages, both of them using the same menu and when clicking menu items, to be taken to that particular section but with a smooth and nice scroll if I'm going to that section from the same page?
Thank you so much