10.0
10.0-rc1
10.1
10.1-rc1
11.0
11.0-rc1
11.0-rc2
11.0-rc3
11.1
11.1-rc1
11.2
11.2-rc1
11.3
11.3-rc1
12.0
12.0-rc1
12.1
12.1-rc1
12.2
12.2-rc1
7.5
7.6
7.7
7.8
7.9
8.0
8.1
8.2
8.3
8.4
9.0
9.1
arm
bdubbs/gcc13
ml-11.0
multilib
renodr/libudev-from-systemd
s6-init
trunk
xry111/arm64
xry111/arm64-12.0
xry111/clfs-ng
xry111/lfs-next
xry111/loongarch
xry111/loongarch-12.0
xry111/loongarch-12.1
xry111/loongarch-12.2
xry111/mips64el
xry111/pip3
xry111/rust-wip-20221008
xry111/update-glibc
Line | |
---|
1 | <refentry xmlns="http://docbook.org/ns/docbook"
|
---|
2 | xmlns:xlink="http://www.w3.org/1999/xlink"
|
---|
3 | xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
4 | xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
|
---|
5 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
6 | version="5.0" xml:id="webhelp.tree.cookie.id">
|
---|
7 | <refmeta>
|
---|
8 | <refentrytitle>webhelp.tree.cookie.id</refentrytitle>
|
---|
9 | <refmiscinfo class="other" otherclass="datatype">string</refmiscinfo>
|
---|
10 | </refmeta>
|
---|
11 | <refnamediv>
|
---|
12 | <refname>webhelp.tree.cookie.id</refname>
|
---|
13 | <refpurpose>Controls how the cookie that stores the webhelp toc state is named.</refpurpose>
|
---|
14 | </refnamediv>
|
---|
15 |
|
---|
16 | <refsynopsisdiv>
|
---|
17 | <src:fragment xml:id="webhelp.tree.cookie.id.frag">
|
---|
18 | <xsl:param name="webhelp.tree.cookie.id" select="concat( 'treeview-', count(//node()) )"/>
|
---|
19 | </src:fragment>
|
---|
20 | </refsynopsisdiv>
|
---|
21 |
|
---|
22 | <refsection><info><title>Description</title></info>
|
---|
23 | <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 webhelptree.cookie.id as follows:
|
---|
24 | <programlisting><![CDATA[
|
---|
25 | <xsl:param name="webhelp.tree.cookie.id">
|
---|
26 | <xsl:choose>
|
---|
27 | <xsl:when test="/*/@xml:id">
|
---|
28 | <xsl:value-of select="concat('treeview-',/*/@xml:id)"/>
|
---|
29 | </xsl:when>
|
---|
30 | <xsl:otherwise>
|
---|
31 | <xsl:value-of select="concat( 'treeview-', count(//node()) )"/>
|
---|
32 | </xsl:otherwise>
|
---|
33 | </xsl:choose>
|
---|
34 | </xsl:param>]]>
|
---|
35 | </programlisting>
|
---|
36 | </para>
|
---|
37 | </refsection>
|
---|
38 | </refentry>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.