What I'm wanting to do is put a "component" (I didn't say Widget as a
TG Widget might not be the best route) on every single page. As an
example (and to go with the why mac questions) say I would like to
implement Mac's Spotlight so the user could search from any page in the
application.
Currently all my page templates extend from the master template.
Ideally I could throw a spotlight.display() widget call in there.
However, that would require me to inject the widget into the expose or
maybe controller methods.
The other thing I thought of was just have some _javascript_ perform a
JSON call which would suck in the widget, render it to HTML and then
insert it into say a div using innerHTML. Problem with this is that I
would have MochiKit on every page... although not a big problem as this
"component" which is on every page requires it.
Any suggestions for having a widget accessible on every page?
There was a link posted an hour ago to an application based on TG released as Open Source, When I looked at the source they do exactly what you ask for. But instead of adding the widget to the dict passed they instantiate the widget inside the template. It looks like a great way to do what you want.
Baruch
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

