OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: Re: DOCBOOK: Customizing the nav-banner in modular stylesheets?

Megan Golding writes:
> I've written a series of docs in DocBook and am using the nwalsh-modular 
> stylesheets to produce HTML output. Is it possible to substitute graphics 
> for the navigation links?
> I was thinking something along the lines of the following in my HTML output:
> NEW: <a href="prevtopic.html"><img src="prev.png"></a>
> CURRENTLY: <a href="prevtopic.html">Previous</a>
> I figure there are two possible solutions that'll work for me:
> 1. Alter my customized stylesheet (.dsl) to put graphics in instead of 
> text. I imagine this would work like the admon-graphics t setting used 
> elsewhere. I'm still quite fuzzy on the stylesheets, and didn't have a lot 
> of luck digging through dbnavig.dsl to find what I need....Ideas?

Something like this in your custom stylesheet ought to work:

(define %navicon-path% "icons/")

(define (gentext-en-nav-prev prev)
    (make empty-element gi: "IMG"
           attributes: '(("SRC" (string-append %navicon-path% "prev.gif"))
                        ("BORDER" "0")
                        ("ALT" "Prev"))))

(define (gentext-en-nav-next next)
    (make empty-element gi: "IMG"
           attributes: '(("SRC" (string-append %navicon-path% "next.gif"))
                        ("BORDER" "0")
                        ("ALT" "Next"))))

(define (gentext-en-nav-up up)
    (make empty-element gi: "IMG"
           attributes: '(("SRC" (string-append %navicon-path% "up.gif"))
                        ("BORDER" "0")
                        ("ALT" "Up"))))

(define (gentext-en-nav-home home)
    (make empty-element gi: "IMG"
           attributes: '(("SRC" (string-append %navicon-path% "home.gif"))
                        ("BORDER" "0")
                        ("ALT" "Home"))))

But I haven't tried it -- might have a booboo in the %navicon-path%


> 2. Write a quick script to run on the output HTML files to substitute the 
> image ref for the words Previous, Next, and Home. I figure this will work, 
> but am aware it is a quick and dirty solution.
> So, how should I go about this?
> Meg
> Megan Golding     |  mgolding@secureworks.net
> Technical Writer  |  SecureWorks, Inc.
> "Tell me and I'll forget. Show me, and I may not remember. Involve me, and 
> I'll understand."  - Native American Proverb
> ------------------------------------------------------------------
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: docbook-request@lists.oasis-open.org

Mark Johnson
Duke Physics        <mark@duke.edu>
Debian SGML         <mrj@debian.org>
Home Page:          <http://dulug.duke.edu/~mark/>
GPG fp: 50DF A22D 5119 3485 E9E4  89B2 BCBC B2C8 2BE2 FE81

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC