[Maypole] additional_data and template_args

Simon Flack sf@flacks.net
Tue, 04 Jan 2005 03:00:10 +0000


Peter Speltz wrote:
> $r->addtional_data is called before model processes request.  I  have only ever
> used additional_data to add some template args.  I would like to use it to add
> object specific template args except I can't because of where this method is
> called. ( The model class process fetches the objects. ) An example is my menu.
> The menu data is different when I'm listing Customers (working with the
> customer class)  than it is if i'm viewing a Customer (working with a specific
> object).
> 
> I'm wondering if people use additional_data in a way that it has an effect on
> their model class processing .  If not maybe the call to $r->additional_data
> should happen after model processing and before view processing.

I've been thinking of adding another method like additional_data which 
would be called before the view is processed. I'll bear this in mind 
when I look at refactoring the Maypole handler.

Thanks

Simon