commit: da6d9033572e33673be0eb14bbb39687d6fb50ca
Author: Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 22 18:58:16 2014 +0000
Commit: Markos Chandras <hwoarang <AT> gentoo <DOT> org>
CommitDate: Tue Jul 22 18:58:16 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/devmanual.git;a=commit;h=da6d9033
Show current page location under the menu
- Use the breadcrump component of bootstrap
- Add printParentDocs template to generate the entries recursively
---
devbook.xsl | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/devbook.xsl b/devbook.xsl
index 98206e8..1d72520 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -494,6 +494,18 @@
</nav>
</header>
<div class="container">
+ <div class="row">
+ <div class="col-md010">
+ <ol class="breadcrumb">
+ <xsl:call-template name="printParentDocs">
+ <xsl:with-param name="path" select="/guide/@self"/>
+ <xsl:with-param name="depth"
select="string-length(/guide/@self)-string-length(translate(/guide/@self, '/' ,
''))"/>
+ </xsl:call-template>
+ </ol>
+ </div>
+ </div>
+ </div>
+ <div class="container">
<xsl:apply-templates/>
</div>
<footer>
@@ -660,6 +672,26 @@
</xsl:choose>
</xsl:template>
+ <xsl:template name="printParentDocs">
+ <xsl:param name="depth"/>
+ <xsl:choose>
+ <xsl:when test="$depth > 0">
+ <xsl:variable name="relative_path_depth_recursion">
+ <xsl:call-template name="str:repeatString">
+ <xsl:with-param name="count" select="$depth"/>
+ <xsl:with-param name="append">../</xsl:with-param>
+ </xsl:call-template>
+ </xsl:variable>
+
+ <li><a href="{$relative_path_depth_recursion}index.html"><xsl:value-of
select="document(concat(/guide/@self, concat($relative_path_depth_recursion,
'text.xml')))/guide/chapter[1]/title"/></a></li>
+
+ <xsl:call-template name="printParentDocs">
+ <xsl:with-param name="depth" select="$depth - 1"/>
+ </xsl:call-template>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
<xsl:template name="findParent">
<xsl:choose>
<xsl:when test="not(/guide/@root)">