You have a few options.
Just add the args to the call: <& /some/component, colors => { blue =>
'cyan', green => 'mint' } &>
See http://www.masonbook.com/book/chapter-2.mhtml#TOC-ANCHOR-9, the
section "Arguments via Component Calls" partway down.
If you want something like $r that you can use for your own purposes,
you could also use $m->notes, or your own globals, to pass info around
without having to explicitly pass it between components. I prefer
objects accessed through global scalars, local-ized in my syshandler for
each request.
See info on $m->notes here:
http://www.masonhq.com/docs/manual/Request.html#item_notes
There are no stupid questions, only l no ,sno it seuqd i puts one rae rehT
HTH,
RJ Herrick
Jim Babcock wrote:
Hello,
I'm wondering how best to pass information to compnents called in the
autohandler. I set up a horizontal menu that is highlighting the current page's
menu item using path info from $r, but I'm seeing limitations with that method.
I'd like to add a sub-menu, which complicates things, but the real issue is
that many of the applications I'm going to make available could be found on
more than one path... for example one of the reports may be picked from the
reports tab that will be available to one group of users or from the
departmental tab for another group.
So know I'm thinking that it might be best to pass the context and sub-context for the menus as some sort of variable, but I'm not sure what the best way to do that is. Should I set up a couple of global variables in the apache conf, create cookies, add them to the request, can I pass it through
Any help would be appreciated,
Jimbus
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users