blob: 8f790be5d00f9f1859ec8428d29c231a86e9dcf4 [file] [log] [blame]
<refentry xmlns=""
version="5.0" xml:id="">
<refmiscinfo class="other" otherclass="datatype">string</refmiscinfo>
<refpurpose>Controls how the cookie that stores the webhelp toc state is named.</refpurpose>
<src:fragment xml:id="">
<xsl:param name="" select="concat( 'treeview-', count(//node()) )"/>
<para>The webhelp output does not use a frameset. Instead, the table of contents is a div on each page. To preserve the state of the table of contents as the user navigates from page to page, webhelp stores the state in a cookie and reads that cookie when you get to the next page. If you've published several webhelp documents on the same domain, it is important that each cookie have a unique id. In lieu of calling on a GUID generator, by default this parameter is just set to the number of nodes in the document on the assumption that it is unlikely that you will have more than one document with the exact number of nodes. A more optimal solution would be for the user to pass in some unique, stable identifier from the build system to use as the webhelp cookie id. For example, if you have safeguards in place to ensure that the xml:id of the root element of each document will be unique on your site, then you could set as follows:
<xsl:param name="">
<xsl:when test="/*/@xml:id">
<xsl:value-of select="concat('treeview-',/*/@xml:id)"/>
<xsl:value-of select="concat( 'treeview-', count(//node()) )"/>