On Jul 16, 2006, at 8:34 PM, Christopher Arndt wrote: > how can I inject a widget into the template variables without > explicitly > including it in the returned dict of a controller method? > > I know about view.variable_providers, but unfortunately > controllers._process_output() does not retrieve CSS or JavaScript from > widgets in the 'tg' namespace. > > I guess, my only option would be an ugly hack by saving view.stdvars() > somewhere and then overriding/wrapping it with my own version that > adds > my widget to the toplevel namespace of the template variables. But > this > would be, well, ugly. > > Any suggestions? If you are wondering about the need for this: I > want to > replace $tg_flash with a nice widget (I'll be releasing a demo soon) > that needs some CSS and JavaScript, and thatswhy I can't just add > it to > the controller output.
I didn't see a reply to this, but it sounds useful. Some people have wanted variable_providers to be able to put things outside of the tg namespace. That might be one way. How would you *like* it to work? Kevin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

