Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    Sep 2006
    Location
    San Antonio, TX, USA
    Posts
    32
    Plugin Contributions
    0

    Default Re: Creating a 'Page Top' link / anchor

    Oh, I see what your issue is/was. Another solution for you would be to add an image/button/link that says "Top" with an onclick event that takes you to the top of the page--no server-side voodoo required.
    Code:
    <img src="Top.png" alt="Top" onclick="document.body.scrollTop=0;" />

  2. #12
    Join Date
    Jan 2007
    Posts
    149
    Plugin Contributions
    1

    Default Re: Creating a 'Page Top' link / anchor

    Hate to open this one back up but the thread is still unanswered if you are in a category. The link tothe anchor still goes to the main page and still refreshes it. Or of course I am still doing it wrong. Is there anyone out there that has made the anchor work with refreshing but going to the top?

    Thanks,
    Rick

  3. #13
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Creating a 'Page Top' link / anchor

    I guess what makes it confusing is that 3 files have to be changed:

    1. includes/templates/custom/common/tpl_footer-pagetop_link.php
    2. includes/templates/custom/common/tpl_footer.php
    3. includes/templates/custom/common/tpl_main_page.php

    Use the code provided by Paul on page 1 of this thread, for the first 2 pages. The 3rd page, is your other half of the link and uses:

    Code:
    <body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
    
    <div><a id="top"></a></div>

    Working example: http://reelstackle.com/

  4. #14
    Join Date
    Jul 2007
    Location
    Jakarta
    Posts
    358
    Plugin Contributions
    0

    help question Re: Creating a 'Page Top' link

    I've tried using the following example from paulm to place a ^top^ link at the bottom of my define_shipping.php page.

    But it doesn't work. Am I missing something? I also have anchor tags on this page that I want to use, but I can't seem to get it working without reloading the whole page.


    Quote Originally Posted by paulm View Post
    Hi Rob,

    So I think it's better to use:
    Code:
    <a href="<?php echo zen_output_string_protected($_SERVER['REQUEST_URI']); ?>#top">Top</a>

  5. #15
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Creating a 'Page Top' link

    Did you apply changes to the 3 files mentioned in the post above yours?

  6. #16
    Join Date
    Jul 2007
    Location
    Jakarta
    Posts
    358
    Plugin Contributions
    0

    help question Re: Creating a 'Page Top' link

    Quote Originally Posted by Website Rob View Post
    Did you apply changes to the 3 files mentioned in the post above yours?

    I got this working, but one of the things I want to do is have links on my shipping_info page to anchor link locations on the same page.

    See: http://www.nahidfashions.com/boutique/shippinginfo.html

    I have this setup, but the page completely reloads. This shouldn't be necessary.
    Is there a similar tag for in-page anchors like the "top" anchor?

  7. #17
    Join Date
    Jul 2007
    Location
    Jakarta
    Posts
    358
    Plugin Contributions
    0

    help question Re: Creating a 'Page Top' link / anchor

    How can apply this to other in-page links?
    Adding more div's in the tpl_main_page.php doesn't seem practical every time I want a new in-page link.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 3
    Last Post: 22 May 2010, 11:41 PM
  2. Creating a link to an Ez-Page
    By secarrol in forum Customization from the Admin
    Replies: 1
    Last Post: 24 Mar 2009, 06:41 AM
  3. creating anchor links in defined pages like shippinginfo.html
    By shocker in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 7 Dec 2008, 11:35 AM
  4. Creating link back to top of page
    By ctcentralinfo in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 12 Jul 2008, 11:48 PM
  5. Back to top anchor in footer.
    By ale.elatey in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 28 Nov 2006, 06:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg