1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.

    Dismiss Notice

How To Create A Link To A Refererce Inside A Document

By balderon, Feb 27, 2011 | |
  1. balderon
    What you are reading is how to add an "anchor" to a post or wiki. There appears to be support in the "Link" tool for linking to an anchor but I couldn't find an easy way to insert an anchor into the document. A workaround for now is to insert an anchor using the "source" editor.

    The HTML anchor tag requires two fields. The first field is an identifier (id="user_unique_anchor_name") and the second field ("My text label") is a label describing the reference. The format of an identifier must be contain the word "user_" followed by a document unique name (the name can be separated by underscores). The second field can be any group of characters. An anchor may be embedded into any part of the text or more commonly embedded into a document heading.

    For example:

    Code:
     [b]Basic anchor format:[/b] <a id="user_unique_anchor_name">My text label</a> [b]Anchor embedded into a heading 3:[/b] <h3><strong><a id="user_create_new_data">Create New Data Heading 3</a></strong></h3> [b]Create a link to an anchor. [/b] This is <a href="#user_my_unique_anchor_name">Link to anchor #1</a> 
    To link to an anchor you may use the built-in "Link" tool or embed the link by editing the HTML.

    To use the built-in link tool click on the "Link" icon in the editor window. Change the protocol to "<other>" and type in the anchor name prefixed by a '#' sign (see below).



    For a table of contents you could embed the tag into any of the "heading" fonts or within the document. See example below.



    My table of contents
    This is a Link to anchor #1
    This is a Link to anchor #2
    This is a Link to anchor #3



    Anchor #1 heading





    Anchor #2 Subheading




    This is Anchor #3 embedded in text.



    The HTML for this example.

    Code:
      <p>     <u><strong>My table of contents</strong></u></p> <p>     This is a <u><a href="#user_anchor1">Link to anchor #1</a></u></p> <p>     This is a <u><a href="#user_anchor2">Link to anchor #2</a></u></p> <p>     This is a <u><a href="#user_anchor3">Link to anchor #3</a></u></p> . . . <h1>     <a id="user_anchor1">Anchor #1 heading</a></h1> . . . <h2>     <a id="user_anchor2">Anchor #2 Subheading</a></h2> . . . <p>     This is <a id="user_anchor3">Anchor #3</a> embedded in text.</p> 

    Share This Article

Comments

  • Not open for further comments.
(You have insufficient privileges to post comments.)
  • Not open for further comments.