[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] breadcrumbs root node
On Monday 03 August 2009 10:21:18 Laurie Burley wrote:
> Has anyone figured out a way to remove the root node from breadcrumbs in
> their html output?
Yup, I have a similar template (taken, with thanks, from
http://www.sagehill.net/docbookxsl/HTMLHeaders.html ).
> I am using the following code to generate my breadcrumbs:
>
> <xsl:template name="breadcrumbs">
> [...]
> </xsl:template>
>
> Any help would be greatly appreciated,
You don't say how your version of "breadcrumbs" template is called; but for
the document I'm editing, I'm generating it from user.header.content.
My (somewhat ugly) solution was to wrap the call to breadcrumbs within a
conditional that tests whether the current node's parent has a parent. The
top-most element will fail this test.
<xsl:template name="user.header.content">
<xsl:if test="boolean(../..)">
<xsl:call-template name="breadcrumbs"/>
</xsl:if>
</xsl:template>
I guess the same would work if the conditional was within the "breadcrumbs"
template.
HTH,
Paul.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]