TWiki> Voting Web>HOWTOLinkToAPage (revision 4)EditAttach

HOW TO: Link to a Page

Table of ContentsUseful Links

Essential Background

Linking is a fundamental operation in a TWiki (and in typical web sites).

There are several ways in which a user can create a link from one page to another.

Ways to Create Links

A user can create links by:

Creating Link Using WYSIWYG Editor

A WYSIWYG Editor is a "What-you-see-is-what-you-get" Editor. It is the style of editing where what a user sees during editing is similar or identical to what they will see when the content is displayed. This is closely related to the editing experience users have when using popular word processors such as MS-Word.

The WYSIWYG Editor is the default editor for most portal pages. See How to Edit a Page for more details.

To create a link using this editor, the user must:

  1. Open the desired page in editing mode and navigate to where the new link should be placed
  2. Type in the link name (i.e., the text you want displayed for the link in the final document)
  3. Highlight the text with your mouse
  4. Click the link button
  5. Type in the name of the portal page (or other web page address/URL)
  6. Click Insert button to insert the link into your page at this location
  7. See the final link
  8. Click save button to save the new link in that page

These steps are illustrated below via screenshots.

Open page and navigate to place the link

Screen_NewlyCreatedTopicPage.png

Type in the link name

CreateLink_WYSIWYG-type-initial-link-text.png

Highlight the text with your mouse

CreateLink_WYSIWYG-highlight-text-to-link.png

Click the link button

CreateLink_WYSIWYG-click-on-link-button.png

Type in portal page and insert link

CreateLink_WYSIWYG-enter-target-page-name.png

See the final link and save

CreateLink_WYSIWYG-final-link-result.png

Creating Link Via Camel Case Naming

The portal system automatically converts every CamelCase word into a link. (NOTE: A camel case word is one where the first letter of each word is capitalized and all other letters are not capitalized.)

After saving, the link will appear showing the Link Name and, when clicked, will take the user to the page having the Link Address.

For example:

Merely typing the word PreElection automatically creates a link to the portal page http://collaborate.nist.gov/voting/bin/view/Voting/PreElection .

Creating Link Using TWiki Syntax

To create a link using the TWiki Markdown syntax merely type the Link Name and Link Address inside square brackets as follows:

[[Link Address][Link Name]]

After saving, the link will appear showing the Link Name and, when clicked, will take the user to the page having the Link Address.

For example:

[[PreElection][Go to Pre-Election Page]]

Creates the link Go to Pre-Election Page which takes us to the portal page http://collaborate.nist.gov/voting/bin/view/Voting/PreElection .

Linking To a Non-Existent Topic Page

If a user creates a link to a portal page that does not yet exist, then the first time any user clicks on that link the portal will create a new page for that topic using the Default Page Template and will open that page in an editor.

CAUTION: If a user wishes for a page to have use a particular page template, then they should explicitly create that page before clicking the link. See creating a page.

For example:

NewTestPage should (using the camel case link creation method create a link to a non-existent topic page called "NewTestPage" which, when we click on it, will open up http://collaborate.nist.gov/voting/bin/view/Voting/NewTestPage for us to edit.

Linking to a Pre-Existing Topic Page

If a user creates a link to a pre-existing portal page, then the link is fully functional after it has been created and saved (i.e., when clicked, it should navigate to and display the expected page).

For example:

PreElection should (using the camel case link creation method create a link to a pre-existing topic page called "PreElection" which is located at http://collaborate.nist.gov/voting/bin/view/Voting/PreElection .

Creating Relative Links

To create a relative link in a given page, two things are necessary:

  1. a named link anchor creating the relative name at a given location in a page
  2. a relative link which refers to that named link anchor

For example:

  1. Edit the page you would like to link to - such as, for example, the NewTopicPage
  2. Navigate to the location within that page, such as a particular section or paragraph, to which you'd like to relatively link
  3. Create a named link anchor at that location by inserting the following text there
                    <a name="RelativeLinkName"></a>
               

If linking from within the same document

  1. Navigate to the location within that page where you'd like to link from (linking back to that named link anchor location now)
  2. Create a link (using the above create link procedure) where
    1. the Link Name is whatever text you want to display for the link
    2. the Link Address is
      #RelativeLinkName

For example:

If we wanted to link to the Creating Link Using WYSIWYG Editor section inside this topic page right now, we could (using the TWiki syntax method of link creation) create a relative link there (which already has an _anchor) as follows:

At the "Creating Link Using WYSIWYG Editor" there is an anchor that looks like this:

<a name="CreateLinkViaWYSIWYG"></a>

Right here, we could put a link to that section by typing this text:

[[#CreateLinkViaWYSIWYG][go to section showing how to create link using the WYSIWYG Editor]]

All that would create the following relative link: go to section showing how to create link using the WYSIWYG Editor

If linking from another document

  1. perform the same steps as you would for creating a link within the same document
  2. only make the Link Address also include the topic page's name, such as:
    NewTopicPage#RelativeLinkName

For example:

If we wanted to link to the Creating Link Using WYSIWYG Editor section from some other topic page right now, we could (using the TWiki syntax method of link creation) create a relative link there (which already has an _anchor) as follows:

At the "Creating Link Using WYSIWYG Editor" there is an anchor that looks like this:

<a name="CreateLinkViaWYSIWYG"></a>

In some other topic page, we could put a link to that section by typing this text:

[[HOWTOLinkToAPage#CreateLinkViaWYSIWYG][go to section showing how to create link using the WYSIWYG Editor]]

All that would create the following link in that other topic page: go to section showing how to create link using the WYSIWYG Editor

This Topic Is Referenced By

QuickReferenceGuide
VotingPortalHelp
Webinars

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r4 - 2015-10-16 - BenjaminLong
 
This site is powered by the TWiki collaboration platform Powered by PerlPLEASE NOTE: This wiki is a collaborative website. NIST does not necessarily endorse the views expressed, or concur with the facts presented on these sites. Further, NIST does not endorse any commercial products that may be mentioned on these sites. All the material on this website is in the public domain, including any text, diagrams, or images, unless indicated explicitly. Don't share anything on this site that you do not want to be public. Do not pass any proprietary documents or put any on the TWiki with implied public disclosure. If you do, it shall be deemed to have been disclosed on a non-confidential basis, without any restrictions on use by anyone, except that no valid copyright or patent right shall be deemed to have been waived by such disclosure. Certain commercial equipment, instruments, materials, systems, software, and trade names may be identified throughout this site in order to specify or identify technologies adequately. Such identification is not intended to imply recommendation or endorsement by NIST, nor is it intended to imply that the systems or products identified are necessarily the best available for the purpose. Any data provided on this site is for illustrative purposes only, and does not imply a validation of results by NIST. By selecting external links, you will be leaving NIST webspace. Links to other websites are provided because they may have information that would be of interest to you. No inferences should be drawn on account of other sites being referenced, or not, from this page. There may be other websites that are more appropriate for your purpose.