Re: Adding images to navbar

From Stefan Boddie
DateFri, 10 Jan 2003 09:26:21 +1300
Subject Re: Adding images to navbar
In-Reply-To (20030109112020X-tao-lib-uchicago-edu)
Hi Tod,

You're just missing some macro definitions for the new buttons I think.
There are quite a number of macros involved and they're spread throughout
base.dm, english.dm, and document.dm.

First try adding the following to your Global macro package:

_MusicGenrewidth_ {_widthtgenrx_}

This should make Greenstone start trying to use the button instead of text
link. You can then see from the HTML it produces if there are any other
macros that have been missed.

cheers,
Stefan.

----- Original Message -----
From: "Tod Olson" <tao@lib.uchicago.edu>
To: <greenstone@tripath.colosys.net>
Sent: Friday, January 10, 2003 6:20 AM
Subject: Adding images to navbar


> [Greenstone 2.38 on Linux, compiled from CVS sources as of 8 Jan
> 2003.]
>
> I have a collection with some non-Dublin Core metadata (e.g.,
> MusicGenre), and classifiers are defined in collect.cfg for these
> metadata. In the navbar, the "button" for MusicGenre browsing is
> plain text, but I need to display the usual green and yellow buttons.
> Similarly, when I go the MusicGenre browse listing, I'd like to
> display a green and white title image.
>
> I have created a custom macro file and added it to main.cfg
> (abbrev. contents below). translate.pl produces the images as
> expected, but they are still not referenced in the HTML.
>
> Can I make these buttons and other images for this non-DC metadata
> display by modifying the macro files, or do I have to tweak the
> receptionist? In either case, where should I look next?
>
>
> Tod A. Olson <tod@uchicago.edu> "How do you know I'm mad?" said Alice.
> Programmer / Analyst "If you weren't mad, you wouldn't have
> The University of Chicago Library come here," said the Cat.
>
>
>
> package Global
>
> ## "genre a-z" ## nav_bar_button ## tgenr ##
> _httpicontgenrgr_ [l=en] {/gsdl/web/images/en/tgenrgr.gif}
> _httpicontgenrof_ [l=en] {/gsdl/web/images/en/tgenrof.gif}
> _httpicontgenron_ [l=en] {/gsdl/web/images/en/tgenron.gif}
> _widthtgenrx_ [l=en] {87}
> _texticontabmusicgenregreen_ [l=en] {Genre}
>
> _icontabMusicGenregreen_ {<img
> src="_httpicontgenrgr_" width=_widthtgenrx_ border=0>}
> _icontabMusicGenregreen_[v=1] {_texticontabmusicgenregreen_}
>
> _imageMusicGenre_
{_gsimage_(_httpbrowseMusicGenre_,_httpicontgenrof_,_httpicontgenron_,musicg
enre,_textimageMusicGenre_)}
> _textimageMusicGenre_ {Browse by genre}
>
> package document
>
> ## "genre" ## green_title ## h_genr ##
> _httpiconhgenr_ [l=en] {/gsdl/web/images/en/h_genr.gif}
> _widthhgenr_ [l=en] {200}
> _heighthgenr_ [l=en] {57}
>
> _iconMusicGenrepage_ {<img src="_httpiconhgenr_" width=_widthhgenr_
> height=_heighthgenr_}
> _iconMusicGenrepage_ [v=1] {<h2>_texticonhgenr_</h2>}
>
> package Global
>