Reece Dunn wrote:
[1] Boost navigation links and "standalone": links are not generated when the doc.standalone parameter is set to 'true'.

The doc.standalone implementation submitted does not work. The code below fixes the problem.


[2] Navigation arrows at the top: I am working on these :). Don't worry, getting this functionality is high on my priorities. Does anyone know where the code that generates the bottom links is found, to speed up the process?

I did a text-search on the docboost stylesheet files and found the code I was looking for. Below is a slight reworking of that code, merging it with the existing boost header.


[header.navigation]
 <xsl:param name="doc.standalone">false</xsl:param>

 <xsl:template name="header.navigation">
    <xsl:param name = "prev" select = "/foo"/>
    <xsl:param name = "next" select = "/foo"/>
    <xsl:param name = "nav.context"/>

<xsl:choose>
<xsl:when test = "$doc.standalone = 'true'">
<img src="../../c++boost.gif"
alt="c++boost.gif (8819 bytes)" width="277" height="86"
/>
</xsl:when><xsl:otherwise>
<table cellpadding = "2" width = "100%" class = "boost-head"><tr>
<td bgcolor = "#FFFFFF" width = "50%" class = "boost-headelem"><img src="../../c++boost.gif"
alt="c++boost.gif (8819 bytes)" width="277" height="86"
/></td>
<xsl:if test = "not($doc.standalone = 'true')">
<td align = "center" class = "boost-headtd">
<a href="../../index.htm" class = "boost-headelem">Home</a>
</td><td align = "center" class = "boost-headtd">
<a href="libraries.html" class = "boost-headelem">Libraries</a>
</td><td align = "center" class = "boost-headtd">
<a href="../../people/people.htm" class = "boost-headelem">People</a>
</td><td align = "center" class = "boost-headtd">
<a href="../../more/faq.htm" class = "boost-headelem">FAQ</a>
</td><td align = "center" class = "boost-headtd">
<a href="../../more/index.htm" class = "boost-headelem">More</a>
</td>
</xsl:if>
</tr></table>
</xsl:otherwise>
</xsl:choose>


    <!-- top-level navigation: based on
         docbook/html/chunk-common.xsl[footer.navigation] -->

    <xsl:variable name="home" select="/*[1]"/>
    <xsl:variable name="up" select="parent::*"/>

    <xsl:variable name="row1" select="count($prev) &gt; 0
                                   or count($up) &gt; 0
                                   or count($next) &gt; 0"/>

    <xsl:variable name="row2" select="($prev and $navig.showtitles != 0)
                                   or (generate-id($home) != generate-id(.)
                                       or $nav.context = 'toc')
                                   or ($chunk.tocs.and.lots != 0
                                       and $nav.context != 'toc')
                                   or ($next and $navig.showtitles != 0)"/>

<xsl:if test="
$suppress.navigation = '0' and $suppress.header.navigation = '0'
"><table width = "100%" class = "navheader">
<tr>
<td align = "left" width = "40%">
<!-- prev:name -->
<xsl:if test="$navig.showtitles != 0">
<xsl:apply-templates select="$prev" mode="object.title.markup"/>
</xsl:if>
<xsl:text>&#160;</xsl:text>
</td><td align = "center" width = "20%">
<!-- home -->
<xsl:choose>
<xsl:when test="$home != . or $nav.context = 'toc'">
<a accesskey="h">
<xsl:attribute name="href"><xsl:call-template name="href.target">
<xsl:with-param name="object" select="$home"/>
</xsl:call-template></xsl:attribute>
<xsl:call-template name="navig.content">
<xsl:with-param name="direction" select="'home'"/>
</xsl:call-template>
</a>
<xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
<xsl:text>&#160;|&#160;</xsl:text>
</xsl:if>
</xsl:when>
<xsl:otherwise>&#160;</xsl:otherwise>
</xsl:choose>
<xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
<a accesskey="t">
<xsl:attribute name="href">
<xsl:apply-templates select="/*[1]"
mode="recursive-chunk-filename"/>
<xsl:text>-toc</xsl:text>
<xsl:value-of select="$html.ext"/>
</xsl:attribute>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'nav-toc'"/>
</xsl:call-template>
</a>
</xsl:if>
</td><td align = "right" width = "40%">
<!-- next:name -->
<xsl:text>&#160;</xsl:text>
<xsl:if test="$navig.showtitles != 0">
<xsl:apply-templates select="$next" mode="object.title.markup"/>
</xsl:if>
</td>
</tr><tr>
<td align = "left" width = "40%">
<!-- prev -->
<xsl:if test="count($prev)>0"><a accesskey="p">
<xsl:attribute name="href"><xsl:call-template name="href.target">
<xsl:with-param name="object" select="$prev"/>
</xsl:call-template></xsl:attribute>
<xsl:call-template name="navig.content">
<xsl:with-param name="direction" select="'prev'"/>
</xsl:call-template>
</a></xsl:if>
<xsl:text>&#160;</xsl:text>
</td><td align = "center" width = "20%">
<!-- up -->
<xsl:choose>
<xsl:when test="count($up)>0">
<a accesskey="u">
<xsl:attribute name="href"><xsl:call-template name="href.target">
<xsl:with-param name="object" select="$up"/>
</xsl:call-template></xsl:attribute>
<xsl:call-template name="navig.content">
<xsl:with-param name="direction" select="'up'"/>
</xsl:call-template>
</a>
</xsl:when>
<xsl:otherwise>&#160;</xsl:otherwise>
</xsl:choose>
</td><td align = "right" width = "40%">
<!-- next -->
<xsl:text>&#160;</xsl:text>
<xsl:if test="count($next)>0"><a accesskey="n">
<xsl:attribute name="href"><xsl:call-template name="href.target">
<xsl:with-param name="object" select="$next"/>
</xsl:call-template></xsl:attribute>
<xsl:call-template name="navig.content">
<xsl:with-param name="direction" select="'next'"/>
</xsl:call-template>
</a></xsl:if>
</td>
</tr>
</table></xsl:if>
<hr/>
</xsl:template>
[/header.navigation]


Regards,
Reece

_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Boost-docs mailing list
[EMAIL PROTECTED]
Unsubscribe and other administrative requests: 
https://lists.sourceforge.net/lists/listinfo/boost-docs

Reply via email to