This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Yahoo-style nav? (was: toc in sect1)
- To: docbook-apps at lists dot oasis-open dot org
- Subject: DOCBOOK-APPS: Yahoo-style nav? (was: toc in sect1)
- From: Claus Rasmussen <claus at arsdigita dot com>
- Date: Thu, 30 Nov 2000 12:23:22 -0500
- Reply-to: claus at arsdigita dot com
> / Claus Rasmussen <claus@arsdigita.com> was heard to say:
> | Now, I would love to have toc's in every sect1
> (Untested, but I think this'll work)
>
> Create a customization layer that contains:
>
> (define (section-element-list)
> (list (normalize "section")
> (normalize "sect1")
> (normalize "simplesect")))
>
> (define ($section-toc$)
> ;; Called by the TITLE element so that it can come after the TITLE
> (build-toc (ancestor-member (current-node) (section-element-list))
> (toc-depth
> (ancestor-member (current-node) (section-element-list)))
> #t))
>
> (define ($section-body$)
> (make element gi: "DIV"
> attributes: (list (list "CLASS" (gi)))
> ($section-separator$)
> ($section-title$)
> ($section-toc$)
> (process-children)))
>
> Let me know if that doesn't work...
Norman, this rocks out very well. I added the (define ($section-toc$)-part
and just the line "($section-toc$)" between ($section-title$) and
(process-children) ... I'm no scheme hacker though..
Anyway, here's another question for you: I'm sure that a lot of people would
be interested in adding yahoo-style breadcrum navigation to their books (or
at least I would). Has anyone already looked into such a thing?
Best
Claus