Link Anchor in another page

I have an Home Page “home.php” with included
a fix to top menu “inc_menu.php”.
In the “inc_menu.php” there are links to anchors in the “home.php” whith use Smoot Scroll
(example: <a class="nav-item nav-link" dmx-on:click="smooth_about.goto('#about')"> About </a>)
Everything works perfectly using the “home.php”
The problem is if I use another page “products.php” with the same menu included.
In this case I need to kink at anchor on the home page
How can I do?
Thanl You

You are trying to call another page and when it loads to smooth scroll to a specific section on it?

The link in the menu goes correctly to the anchor if the menu is included in the Home
But if the same menu is included on another page it clearly doesn’t work
Do I have to create a different menu?
Or is there a possibility to use the same menu?

Marzio, in order to point to a different page, you need to use href=""

<a href="home.php">Home</a>

onclick with goto pointing to the element on the page won’t work.

Yes of course, but in this way I have two problems:
1- link to the home page but does not go to anchor
2- the direct link to the anchor no longer works on the home page

You cannot have both like that…

Probably try using:

<a href="home.php#about">Home</a>

to see if it works fine.

It works as an external page, but in this case it does not work the offset value, necessary to space the menu

Yes it won’t work with offset.
There is no really a way of having both working like that.

OK Thanks Teodor
I will look for an acceptable solution