Matt Wilson schrieb:
> I have a widget that draws a list of links at the top of every page.
> I highlight certain links depending on the current page and depending
> on some data in my database.
> 
> Right now, in every single controller method, I have to instantiate
> and return this widget.  It's tedious.  Is there a better way to
> always return this widget?

http://docs.turbogears.org/1.0/Configuration#turbogears-app-cfg-configuration-reference

Look for 'tg.include_widgets'

BTW: You shouldn't need to instantiate the widget for every request.
Instantiate it once in the module where you define it and import it from
there or put the dotted-path for it in tg.include_widgets.

Chris

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to