#188353 wml: wml::des::navbar pos argument has no effect

#188353#5
Date:
2003-04-09 15:14:34 UTC
From:
To:
The pro/epilog pos argument as documented in the wml::des::navbar
manpage does not produce the results one would expect.


Here is a minimal example:

#use wml::des::navbar

<navbar:define>
<navbar:prolog>begin</navbar:prolog>
<navbar:epilog>end</navbar:epilog>
<navbar:prolog pos=first></navbar:prolog>
<navbar:epilog pos=last></navbar:epilog>
<navbar:button id=a txt=a>
<navbar:button id=b txt=b>
<navbar:button id=c txt=c>
</navbar:define>

<navbar:render>
<navbar:debug>


This code should produce the text aendbeginbendbeginc
but instead it produces the following output:

beginaendbeginbendbegincend

Following is the debug output, please note that
{PROLOG}{N}{1} and {EPILOG}{N}{3} seem to be correctly
set to the empty string.

$VAR1 = {
          'FOOTER' => '',
          'TARGET' => '',
          'BUTTON' => [
                        {
                          'URL' => '',
                          'HINT' => '',
                          'ID' => 'a',
                          'TXT' => 'a',
                          'TAG_ATTR' => {},
                          'IMG' => '',
                          'TARGET' => '',
                          'ALIAS' => '',
                          'MENU' => '',
                          'ALT' => ''
                        },
                        {
                          'URL' => '',
                          'HINT' => '',
                          'ID' => 'b',
                          'TXT' => 'b',
                          'TAG_ATTR' => {},
                          'IMG' => '',
                          'TARGET' => '',
                          'ALIAS' => '',
                          'MENU' => '',
                          'ALT' => ''
                        },
                        {
                          'URL' => '',
                          'HINT' => '',
                          'ID' => 'c',
                          'TXT' => 'c',
                          'TAG_ATTR' => {},
                          'IMG' => '',
                          'TARGET' => '',
                          'ALIAS' => '',
                          'MENU' => '',
                          'ALT' => ''
                        }
                      ],
          'NEXT' => '',
          'IMGSTAR' => 'n:s:o',
          'INDEX' => 1,
          'UP' => '',
          'FILTER' => '',
          'IMGBASE' => '',
          'TXTCOL_N' => '',
          'HEADER' => '',
          'TXTCOL_S' => '',
          'OPEN' => 1,
          'NAME' => 'unknown-navbar',
          'URLBASE' => '',
          'PROLOG' => {
                        'S' => {},
                        'N' => {
                                 '1' => '',
                                 'any' => 'begin'
                               },
                        'SS' => {}
                      },
          'PREV' => '',
          'EPILOG' => {
                        'S' => {},
                        'N' => {
                                 '3' => '',
                                 'any' => 'end'
                               },
                        'SS' => {}
                      }
        };

#188353#10
Date:
2003-04-09 22:56:22 UTC
From:
To:
Hi Mario,

unfortunately <navbar:prolog> and <navbar:epilog> cannot be unset
this way, you must define it to a string which will be discarded
by another pass, e.g.
  <navbar:prolog pos=first>[DUMMY::]</navbar:prolog>
  <navbar:epilog pos=last>[DUMMY::]</navbar:epilog>

This navbar module is fragile, I am reluctant to perform changes,
but I will try to make your example work as expected.

Denis