This may be a FAQ, but I'm a newbie, so please bear with me!

I have understood that if you have an autohandler in
each directory in a tree all the autohandlers will
be executed, so that any HTML in any of the autohandlers
will end up in the generated document.

Now I wonder if I can create an array in the top level
autohandler and then add some element(s) to it in the
successive autohandlers at lower levels?

The thing is I want to have a row at the top of every
page with links to the index pages in the directory
tree like, say:

   Home - Language - Tibetan - Alphabet - Initials

reflecting a directory tree

webrooot ('Home')
    autohandler
    language (directory)
       autohandler
       tibetan (directory)
          autohandler
          alphabet (directory)
             autohandler
             index.mhtml
             initials.mhtml

Then if I write in the top autohandler

   % my @chainnames = ('/');
   % my @chainlinks = ('<a href="/">Home</a>');

and then in each lower autohandler write the equivalent of

   % push(@chainnames, 'language/');
   % push(@chainlinks, '<a href="' . join('',@chainnames) .
   %   '">Language</a>');

Then have the page initials.mhtml at the lowest level call a
component that writes out

   <p>
   % foreach $link (@chainlinks) {
       &nbsp;<% $link %>&mdash;&nbsp;
   % }
   </p>

I'm sure that if this works in principle the business with
the arrays can be further automatized (e.g. is it possible
to 'automatically' get the name containing each autohandler?)
but is it possible in principle?
-- 


/BP 8^)>
--
Benct Philip Jonsson -- melroch at melroch dot se

    a shprakh iz a dialekt mit an armey un flot

                                 (Max Weinreich)


_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to