[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Changing the navigation banner header
Norman Walsh wrote: > Sure, override (define (nav-banner elemnode)) to do what you want. Here's what we came up with. Perhaps others might like to use it... From the html/dbnav.dsl stylesheet, copy to your custom stylesheet: ................................................................... (define (nav-banner elemnode) (let* ((rootelem (sgml-root-element)) (info (info-element rootelem)) (subtitle-child (select-elements (children rootelem) (normalize "subtitle"))) (subtitle-info (select-elements (children info) (normalize "subtitle"))) (subtitle (if (node-list-empty? subtitle-info) subtitle-child subtitle-info)) (banner-text (inherited-dbhtml-value elemnode "banner-text")) (banner-href (inherited-dbhtml-value elemnode "banner-href")) (banner (if (and banner-text (not (string=? banner-text ""))) (literal banner-text) (make sequence (element-title-sosofo rootelem) (if (node-list-empty? subtitle) (empty-sosofo) (make sequence (literal ": ") (with-mode subtitle-mode (process-node-list subtitle)))))))) (make sequence (if banner-href (make element gi: "A" attributes: (list (list "HREF" banner-href)) banner) banner)))) ......................................................................... 2. Change the line: (let* ((rootelem (sgml-root-element)) to: (let* ((rootelem (ancestor-member (current-node) (list(normalize "book")))) What this does is instead of putting the root element (Set) at the top of the navigation banner for every page, it puts the book ancestor of the current node (Book). This way you get the book title and subtitle for each book you are in. --- Bob
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC