Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-08-28 03:58:37

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 206
Website

Menu links in One-Multi Page site

Hi. I can’t figure out how to link to one page to another using anchors. I mean, I got this site, where the front page is OnePage design, but I have a blog, where the menu-bar is shared, so, when I’m in the front page, I can navigate using #index, #about, #contact… but once I am on another page, like “blog”, When I click the menu is not working, because, I think, the URL is using a “slash /” at the end like this: site.com/#home and I need this to work: site.com#home. But I can’t make it work, even I wrote the url and not using <txp:site_url />.

Any ideas?

Offline

#2 2018-08-28 04:05:20

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,599
Website

Re: Menu links in One-Multi Page site

I think your links are okay – they work if you insert them manually into the address bar. I think, instead, it’s a script that you have on your page that intercepts the click and tries to smooth-scroll to the anchor but as the anchor is not on the blog page, it appears to do nothing.


TXP Builders – finely-crafted code, design and txp

Offline

#3 2018-08-28 07:10:34

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,081
Website

Re: Menu links in One-Multi Page site

robhert wrote #313660:

I think, the URL is using a “slash /” at the end like this: site.com/#home and I need this to work: site.com#home. But I can’t make it work, even I wrote the url and not using <txp:site_url />.

The first one example.com/#anchor is the correct format. The issue however, as Jacob hints, is probably somewhere with your scripts.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#4 2018-08-28 13:15:07

robhert
Member
From: Perú
Registered: 2007-04-27
Posts: 206
Website

Re: Menu links in One-Multi Page site

jakob wrote #313661:

it’s a script that you have on your page that intercepts the click and tries to smooth-scroll to the anchor

Thank you guys! Yes. It was the script trough a css class that creates a smooth-scroll. But I’ve created a <txp:if_section /> so the class shows only on the front-page and the inner pages are not using the class.

Offline

Board footer

Powered by FluxBB