Linking To Wiki Pages Used As Thl Content

THL Toolbox > Developers' Zone > Web Development > Linking to Wiki Pages Used as THL Content

Linking to Wiki Pages Used as THL Content

Every page on the new THL site has the necessary code for importing any Collab Wiki page into its content. This is done through formulating a special link to the wiki page using the hash symbol (#). The link is formed as any HTML link using the <a> element. The href attribute for the <a> element should be set to: #wiki={the url for the public version of the wiki page relative to the collab site}.

To find the link to the public version of the wiki page, do the following:

  1. Go to that page on the collab site
  2. Click on the "Info" link at the top of the page
  3. Locate the link to "Public View" and copy that URL from the "/access/…" to the end of the URL
  4. Set href attribute of the a element to #wiki= plus the copied URL.

By way of example, the URL for the public version of this page is:

external link: https://collab.itc.virginia.edu/access/wiki/site/c06fa8cf-c49c-4ebc-007f-482de5382105/linking%20to%20wiki%20pages%20used%20as%20thl%20content.html

A link from a THL page to include this content in the page would thus be:

<a href="#wiki=/access/wiki/site/c06fa8cf-c49c-4ebc-007f-482de5382105/linking%20to%20wiki%20pages%20used%20as%20thl%20content.html">View instructions on how to link to a wiki page</a>.

Clicking on such a link would replace the content of THL page with the wiki content, as you are viewing presently.

New Markup as of August 2010, from Than Grove

external link: http://dev.thlib.org/about/wiki/thdl%20home%20overview.html

The old way of doing wikis also still works, e.g.:
external link: http://dev.thlib.org/#wiki=/access/wiki/site/0b308aa3-d044-469b-009a-d34c7841413d/thdl%20home%20about%20us.html but I've also added code to allow for an abbreviated version:
external link: http://dev.thlib.org/#wiki=/about/thdl%20home%20about%20us.html

Linking within a Wiki Page to another Wiki Page

To link from one wiki page the content of which is delivered into a THLIB page to another wiki page the content of which is delivered into a THLIB page, use square brackets [ ]for the link. You can specify the text of the link you want to appear and separate it from the name of the wiki page like this:

Linking within a Wiki Page to a Specific Section of another Wiki Page

In the wiki page being linked to, enter an anchor tag at the place you want to link to. Then in the wiki page that has the link, create the link as described above, but add #[name of anchor] at the end of the wiki page name. Example: Wiki page being linked to:

Wiki page that has the link to this section:

Provided for unrestricted use by the external link: Tibetan and Himalayan Library