On Blog page jumper buttons jumps to index page instead of inside the page

  • 1
  • Question
  • Updated 6 years ago
  • Answered
Yollers, on my Blog page jumper buttons jumps directly to index (Home) page instead of moving inside the page. Other pages with the same function are in tact. Is it somehow specific to pre-lined Blog page code and I need to remove my lovely buttons?
You can try it yourself here http://www.protogama.yolasite.com/blo...

Cheers!
Ben
Photo of Ben

Ben

  • 71 Posts
  • 20 Reply Likes
  • confused

Posted 6 years ago

  • 1
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
Hi Ben,

Setting multiple anchors (jumps) in a blog post may show a problem. The problem apparent is that it seems to jump out of the current post and out to the root page of the blog/site. There it sits.... Forever!

It appears that the blog setup uses a "base ref" tag.

Thus: <base href="http://{www.example.com}/{app}.php" />

An article reference explains the effect of this:
Ref: http://www.ilikespam.com/blog/using-b...

"The purpose of the tag is to specify the base location for resolving relative urls. It was only ever meant to be used for viewing a page where the document root is not available (for example, from an email) and should technically point to the actual document location, rather than the homepage. However, there are two significant advantages to the latter:
1. Your site can be generally easily ported to a new location (not with Yola though); and
2. Your web applications can be built without any reference to the location they are installed."

But.....

"Unfortunately, there is one downside - it breaks anchor links."

The solution: to include the path to the blog post either as a relative or an absolute URL.

Absolute URL
http://www.example.com/page#anchor

So you won't have to remove your buttons just change the anchor code to include the complete path.
Photo of Philip Taylor

Philip Taylor

  • 355 Posts
  • 66 Reply Likes
Well done Gop; it gave me some very useful information too. Keep up the good work.
Photo of Gop

Gop

  • 7473 Posts
  • 2115 Reply Likes
Thanks Philip and you're welcome.
Photo of Ben

Ben

  • 71 Posts
  • 20 Reply Likes
Gop, you are the legend! Sorted.