Linking To A Thdl Essay
<h3 class="heading-h6"><a name="THLToolboxhomegtDevelopersZonegtWebDevelopmentgtTHLEssaysinCocoonTHDLEssaysinCocoongtLinkingtoaTHLEssay" class="anchorpoint"></a><a href="/tools/wiki/home.html">THL Toolbox</a> > <a href="/tools/wiki/Developers%27%20Zone.html">Developers' Zone</a> > <a href="/tools/wiki/Web%20Development.html">Web Development</a> > <a href="/tools/wiki/THDL%20Essays%20in%20Cocoon.html">THL Essays in Cocoon</a> > Linking to a THL Essay</h3><p class="paragraph">
</p><h3 class="heading-h1"><a name="LinkingtoaTHLEssay" class="anchorpoint"></a>Linking to a THL Essay</h3><p class="paragraph">Linking to a THL essay can be accomplished from any page within THL using the hash indicator #essay=<em class="italic">{essay url}</em>. The docroot path should <strong class="bold">not</strong> be included prior to the hash indicator. An example link is:</p><div class="code"><pre><a href="#essay=/cabezon/sera/people/monks">Monks at Sera<a></pre></div><p class="paragraph">The essay URL can either end in a slash or not. So, either <em class="italic">#essay=/cabezon/sera/people/monks</em> or <em class="italic">#essay=/cabezon/sera/people/monks/</em> should work.</p><p class="paragraph"><strong class="bold">Debugging Note:</strong> 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.
</p><h3 class="heading-h2"><a name="FormationoftheEssayURL" class="anchorpoint"></a>Formation of the Essay URL</h3><p class="paragraph">The essay URL appended after "#essay=" is formed on the basic principle of /<em class="italic">{author's last name}</em>/<em class="italic">{essay-title}</em>/. 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</p><p class="paragraph">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.
</p><h3 class="heading-h3"><a name="URLtoaParticularSectionofanEssay" class="anchorpoint"></a>URL to a Particular Section of an Essay</h3><p class="paragraph">To link to a section of an essay other than the first, append "/s/<em class="italic">{section id}</em>/. 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:</p><div class="code"><pre>See section on <a href="#essay=/cabezon/sera/monks/s/b2">the vows of a monk at Sera<a> …</pre></div><p class="paragraph">
</p><h3 class="heading-h3"><a name="URLtotheWholeEssayViewAll" class="anchorpoint"></a>URL to the Whole Essay (View All)</h3><p class="paragraph">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.</p><div class="code"><pre>View the whole <a href="#essay=/cabezon/sera/monks/all/">Monks at Sera<a> essay ....</pre></div><p class="paragraph">
</p><h3 class="heading-h6"><a name="ProvidedforunrestrictedusebythespanclassnobrimgsrcsakairwikitoolimagesicklearrowgifaltexternallinktitleexternallinkahrefhttpwwwthliborgtargetrwikiexternalTibetanandHimalayanLibraryaspan" class="anchorpoint"></a><em class="italic">Provided for unrestricted use by the <span class="nobr"><img src="/" alt="external link: " title="external link"/><a href="http://www.thlib.org" target="rwikiexternal">Tibetan and Himalayan Library</a></span></em></h3>