Linking To A Thdl Essay

THL Toolbox > Developers' Zone > Web Development > THL Essays in Cocoon > Linking to a THL Essay

Linking to a THL Essay

Linking to a THL essay can be accomplished from any page within THL using the hash indicator #essay={essay url}. The docroot path should not be included prior to the hash indicator. An example link is:

<a href="#essay=/cabezon/sera/people/monks">Monks at Sera<a>

The essay URL can either end in a slash or not. So, either #essay=/cabezon/sera/people/monks or #essay=/cabezon/sera/people/monks/ should work.

Debugging Note: If an essay URL does not work, try adding or removing the final slash "/". If it still does not work, either 1. the URL does not match the XML file name, in this case cabezon-sera-people-monks.xml, or 2. the XML file has an error in it and does not validate. If it is the latter case, you'll need to go the XML file, open it in Oxygen, and press the validate button. Fix any errors that appear.

Formation of the Essay URL

The essay URL appended after "#essay=" is formed on the basic principle of /{author's last name}/{essay-title}/. However, any dashes (-) within the essay title itself should also be converted into slashes (/). For instance, the file name for the essay in the example above is actually cabezon-sera-monks.xml. For the essay in Sera Hermitages on Chupzang, whose filename is cabezon-sera-herm-chupzang.xml, the corresponding essay URL would be: #essay=/cabezon/sera/herm/chupzang

All these URLs will link to the first page of the desired essay. To link to subsequent pages or to the whole essay, see below.

URL to a Particular Section of an Essay

To link to a section of an essay other than the first, append "/s/{section id}/. The section ID is the id attribute given to the particular section of the essay in a <div1>, <div2>, etc. of the essay. All such divs must have an ID attribute. Thus, for the "Vows" section of the Sera Monks essay, whose ID is "b2", the essay URL is: #essay=/cabezon/sera/monks/s/b2 and the link would look like:

See section on <a href="#essay=/cabezon/sera/monks/s/b2">the vows of a monk at Sera<a> …

URL to the Whole Essay (View All)

To have the whole essay displayed in one page, append "/all/" to the essay URL. Thus, using the running example, the essay URL would be: #essay=/cabezon/sera/monks/all/, and the link would be.

View the whole <a href="#essay=/cabezon/sera/monks/all/">Monks at Sera<a> essay ....

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