Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: "Top" link for each page.  (Read 2574 times)

Manuel Pancorbo

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 72
"Top" link for each page.
« on: December 19, 2006, 05:05:02 pm »

I want to add a link in the footer to the upper part of the page. The code I wrote does not work, because it browses to the header of *home page*, not the header of *current page*.

This is my code:
Code: [Select]
...


(the content, side bar, and so on)


...
What is wrong?

TIA
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
"Top" link for each page.
« Reply #1 on: December 19, 2006, 05:46:17 pm »

"" you mean?  We've done it already, follow the link, look in part 1. One of the jump_to links mentioned is "top". Hope that helps.
Logged

Manuel Pancorbo

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 72
"Top" link for each page.
« Reply #2 on: December 19, 2006, 06:56:50 pm »

OK. Thanks!

I hacked the code in order to input the id and label (not depending on language variable with fixed index 'top' or anything).:

Code: [Select]
// JUMP TO link generator
function jump_to($id, $label) {
$categorySEF = get_id('category');
$articleSEF = get_id('article');
$link = ''.$label.'';
echo $link;
}
Then,
Code: [Select]
is my election to put on "index.php"
Logged

Fred K

  • Still trying to learn stuff
  • ULTIMATE member
  • ******
  • Karma: 130
  • Posts: 2728
    • Personal
"Top" link for each page.
« Reply #3 on: December 19, 2006, 07:24:34 pm »

Nice. Thanks, I've updated the mod post with this code.
Logged