Re: Adding images to navbar

From Gordon Paynter
DateFri, 10 Jan 2003 15:37:14 +1300 (NZDT)
Subject Re: Adding images to navbar
> 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?

Hi Tod,

I do this all the time with no problem. You're probably missing some
macros, as Stef suggests. Here's a working example from my macros
directory (for a metadata field called "film") that you can compare your
version to.

Of course, you need the appropriate images in the correct directories. Be
careful that the translate.pl script doesn't put your images in
$GSDLHOME/images/en when they're supposed to be in $GSDLHOME/images. (Note
that translate.pl may also change your macro file to compensate for this
quirk.)

HTH,
Gordon


# film.dm

# This file defines a set of images and titles for a new metadata element.
# Usually these images are defined in several seperate macro files.


# Usually defined in base.dm

package Global

_Filmwidth_ {_widthtfilmx_}

_imageFilm_
{_gsimage_(_httpbrowseFilm_,_httpicontfilmof_,_httpicontfilmon_,film,_textimageFilm_)}

_icontabFilmgreen_ {<img
src="_httpicontfilmgr_" width=_widthtfilmx_ border=0>}
_icontabFilmgreen_ [v=1] {_texticontabFilmgreen_}


# Usually defined in document.dm

package document

_textFilmpage_ {_texticonhfilm_}

_iconFilmpage_ {<img src="_httpiconhfilm_" width=_widthhfilm_
height=_heighthfilm_}
_iconFilmpage_ [v=1] {<h2>_texticonhfilm_</h2>}


# Usually defined in language-specific files

package Global

_textimageFilm_ {Browse films}
_texticontabFilmgreen_ {films}

## "films" ## nav_bar_button ## tfilm ##
_httpicontfilmgr_ {_httpimg_/tfilmgr.gif}
_httpicontfilmof_ {_httpimg_/tfilmof.gif}
_httpicontfilmon_ {_httpimg_/tfilmon.gif}
_widthtfilmx_ {87}

package document

_texticonhfilm_ {Films}

## "films" ## green_title ## h_film ##
_httpiconhfilm_ {_httpimg_/h\_film.gif}
_widthhfilm_ {200}
_heighthfilm_ {57}

package help

_textFilmshort_ {access publications by virtual film}

_textFilmlong_ { <p>You can <i>access publications by virtual film</i> by
pressing the <i>film</i> button.
This brings up a list of the &amp;films&amp; of pictures in the
collection. }