This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Title Page at Root Level of CHM TOC


Naomi Gronson wrote:

I think this is the proper forum, but I could be
wrong.  In some .chm deliverables created from
RoboHelp and in some others that I've seen on the net,
there is an actual topic-icon named title-page and
sometimes a "what's new" page included at the root
level in the .chm's left, TOC pane.  Below it are all
the chapter-icons that look like books and coorespond
to chapters.  Clicking on the titlepage topic brings
you back to the titlepage just as the home button
does.

They look like this in the chm's TOC:

[topic icon] TitlePage
[topic icon] What's New
[Chapter icon] Introduction
[Chapter icon] Installation Procedure
...etc

If you set


<xsl:param name="htmlhelp.hhc.show.root" select="0"/>

you will get what you want, except that instead of TitlePage you will see text Table Of Contents. To change this to your text, you must add following template into your customization layer (changes are near to ***TitlePage*** text):

<xsl:template match="book" mode="hhc">
<xsl:variable name="title">
<xsl:if test="$htmlhelp.autolabel=1">
<xsl:variable name="label.markup">
<xsl:apply-templates select="." mode="label.markup"/>
</xsl:variable>
<xsl:if test="normalize-space($label.markup)">
<xsl:value-of select="concat($label.markup,$autotoc.label.separator)"/>
</xsl:if>
</xsl:if>
<xsl:call-template name="escape-attr">
<xsl:with-param name="value">
<xsl:apply-templates select="." mode="title.markup"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>


<xsl:if test="$htmlhelp.hhc.show.root != 0 or parent::*">
<xsl:text disable-output-escaping="yes">&lt;LI&gt; &lt;OBJECT type="text/sitemap"&gt;
&lt;param name="Name" value="</xsl:text>
<xsl:value-of select="normalize-space($title)"/>
<xsl:text disable-output-escaping="yes">"&gt;
&lt;param name="Local" value="</xsl:text>
<xsl:call-template name="href.target.with.base.dir"/>
<xsl:text disable-output-escaping="yes">"&gt;
&lt;/OBJECT&gt;</xsl:text>
</xsl:if>
<xsl:if test="part|reference|preface|chapter|appendix|bibliography|article|colophon|glossary">
<xsl:variable name="toc.params">
<xsl:call-template name="find.path.params">
<xsl:with-param name="table" select="normalize-space($generate.toc)"/>
</xsl:call-template>
</xsl:variable>
<xsl:text disable-output-escaping="yes">&lt;UL&gt;</xsl:text>
<xsl:if test="contains($toc.params, 'toc') and $htmlhelp.hhc.show.root = 0 and not(parent::*)">
<xsl:text disable-output-escaping="yes">&lt;LI&gt; &lt;OBJECT type="text/sitemap"&gt;
&lt;param name="Name" value="***TitlePage***"&gt;
&lt;param name="Local" value="</xsl:text>
<xsl:call-template name="href.target.with.base.dir"/>
<xsl:text disable-output-escaping="yes">"&gt;
&lt;/OBJECT&gt;</xsl:text>
</xsl:if>
<xsl:apply-templates select="part|reference|preface|chapter|bibliography|appendix|article|colophon|glossary"
mode="hhc"/>
<xsl:text disable-output-escaping="yes">&lt;/UL&gt;</xsl:text>
</xsl:if>
</xsl:template>



-- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz ------------------------------------------------------------------ Profesionální školení a poradenství v oblasti technologií XML. Úvod do XML 3.5. DocBook 18.-19.5. XSLT 24.-26.5. XML pro vývojáře 7.-8.6. ------------------------------------------------------------------

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]