Get Help/FAQs and Guides/Site editing tools and features

How do I add an Anchor within a page?

Walt
posted this on November 03, 2011 12:51

You can add a line of script to any object that offers a link tab and get your visitors to points on a page, especially if it's a long page. This currently only works when anchoring to a point on the same page not on adjacent pages or pages on another site.

This does work best with Text Boxes (and Title Boxes if using Standard fonts). Remember only Standard fonts offer the Link tab on the editor, unlike Graphic fonts which don't. It should also work for images. 

This can be done within the Editor using the following steps:

      1. Add your anchor point (title or text box or image) to your page and note the X and Y coordinates of your object
      2. Add a text box from the Toolbar
      3. Add some relevant text, then highlight the text you want to use to send visitors to the anchor e.g. "Go to Page Summary"
      4. Turn the highlighted text into a link using Link tab in the Editor
      5. Select the WWW icon (Link to an external URL)
      6. Delete or overwrite the "http://" and add the following script:  
      7. javascript:window.scrollTo(x,y);
      8. Replace the x,y coordinates above with correct location position from point 1
      9. Click "Apply" and save your page

Page_Anchor_3.jpg

Adding internal page anchor using Javascript


And that's it. The text when clicked in View mode or seen as a visitors should now take visitors to the appropriate point on the page. The Javascript will simply ensure the anchor point is visible on the screen.

NB. See also our FAQ on Return to Top (of page) Anchors. At present there are no options to link to an anchor on another page on your site or to provide an anchor link from an external source.  

 
Topic is closed for comments