[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: help, completely lost....

On Tue, 22 Jun 1999, Bruno Boettcher wrote:

> BTW is there somewhere any example on how to make a navigation bar for slides?
> The documentation is quite hard to read, and the tutorial has lots of
> examples, 
> but not the things that i want to do....

Here is what i did for a recent presentation:
<define-tag visit-tour-next>
    my $next = '';
    if ( -f "visit-tour" ) {
        open(FP, "< visit-tour") or die "Cannot open visit-tour";
        local($/) = undef;
        my $links = ' ' . <FP>;
        if ($links =~ m|\s$(WML_SRC_BASENAME)\s+(.*?)\s|s ) {
            $next = $1 . ".html";
    if ($next eq '') {
        print "<img src=\"$(EXPO_IMG_BASE)/conf.gif\" \
                    alt=\"Linux Expo June 17/18 1999\">";
    else {
        print "<a href=\"$next\"><img \
                    src=\"$(EXPO_IMG_BASE)/conf.gif\" \
                    alt=\"Next\" border=0></a>";
I then inserted the <visit-tour-next> tag in the navbar.
In each sub-directory, the ``visit-tour'' file contains the sequence of
pages, e.g. in top/visit-tour
  intro plan chap1/index conc refs
In top/chap1/visit-tour
  index sect1 sect2 sect3 ../conc

Another solution is to define menus in navigation bars (with wml-1.7.1).
For instance,
<navbar:define name=main>
#   Suppress all links except up, prev, next
        my ($mcode) = @_;
        $mcode =~ s/SUPPRESS_FROM_THIS.*SUPPRESS_TO_THIS//s;
        return $mcode;

    <navbar:prolog pas=next>SUPPRESS_FROM_THIS</navbar:prolog>
    <navbar:button id=chap1 menu=chap1 url="chap1.html" txt="chap1">

    <navbar:button id=chap2 menu=chap2 url="chap2.html" txt="chap2">

    <navbar:epilog pos=next>SUPPRESS_TO_THIS</navbar:epilog>
    <navbar:button id=chap3 menu=chap3 url="chap3.html" txt="chap3">

    <navbar:button url="#UP#"   txt="[ UP ]">
    <navbar:button url="#PREV#" txt="[PREV]">
    <navbar:button url="#NEXT#" txt="[NEXT]">
<navbar:define name=chap1>
    <navbar:button id=sect1-1 url="sect1-1.html" txt="sect1">
    <navbar:button id=sect2-1 url="sect2-1.html" txt="sect2">
    <navbar:button id=sect3-1 url="sect3-1.html" txt="sect3">
and so on.
The up/prev/next links will be computed automatically.

If your slides are just a big picture with navigation bars, i suggest
you to make this image clickable. Click on it to go to the next slide.
To go back, use the right button.


Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com