[Helma-user] deep macros with session object
Hannes Wallnoefer
hannesw at gmail.com
Fri Apr 13 15:04:03 CEST 2007
2007/4/13, tobias.schaefer at orf.at <tobias.schaefer at orf.at>:
> hello
>
> next question:
>
> where do i have to put the getMacroHandler() method if i want to resolve the following deep macro structure?
>
> <% session.user.name %>
>
> session is the helma session object, session.user a logged in user (ie. an instance of the User prototype).
Nope, session in the macro context is not the session object itself,
but session.data. And since session.data is an untyped hopobject, you
don't have to implement getMacroHandler() in order to use deep macros
on it:
session.data.foo = { bar: 123 };
can be accessed from skins via:
<% session.data.foo %>
hope that helps,
hannes
> ciao,
> tobi
> _______________________________________________
> Helma-user mailing list
> Helma-user at helma.org
> http://helma.org/mailman/listinfo/helma-user
>
More information about the Helma-user
mailing list