Peter Speltz wrote:
> This is cool Dave.
Thanks!
> It got me thinking Maybe a Maypole::Plugin::Menu would be feasible.
Sounds a good idea.
> -- A way to distinguish object actions and class actions.
AFAIK, the only way in general to tell is to read the code, so this
would have to be indicated explicitly, perhaps by an extra attribute.
> -- A way for model to customize and add additional actions from other
> model classes to their menus
I think it would be very useful to have a general way to plug in
additional functionality to models (rather than the list of use this;
use that; that you see at the start of Maypole::Model::CDBI). I think
Sebastian has added code to Class::DBI::Loader to help with this and I
think Simon's considering the best way to handle it in Maypole.
> -- A "action_names" sub to specify what to call these
I'd suggest an alternative here. The names you want are text strings for
display, so IMHO they should NOT be generated in code. They should be
generated by web-designers, marketroids or localisers. The actions
themselves have valid identifiers so the simplest scheme is just to
write an action_names.tt and PROCESS that:
[%- action_names = {
view = 'View Item'
register = 'Register for a Subscription'
etc = 'Whatever You Want'
}
-%]
Or maybe use the magical 'global' template variable.
[% global.action_names = { ...} %]
Hmm, now if I generalize that argument, do I believe that column and
table display names should be generated the same way? I wonder. I'll
think about that for a bit but there could be another revision of my
loader-generator on the way!
Cheers, Dave
_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT