On Wed, 16 May 2007 at 18:37, Uwe C. Schroeder wrote:
> Ok, I've probably not gotten the concept of widgets in TG yet.
>
> There isn't a single usable example on how to use widgets other than form

I agree that there are no really good intro examples.
That I;ve found, anyway. One of us needs to write one :)

> in the (Genshi) template i just call
> <div>${ET(tabwidget.display())}</div>

And here's one place the examples I Saw broken down:
not showing what needs to go in the template.

If you do something like:

   ET(tabwidget.display(somevar='somevalue'))

then I believe somevar will be available for substitution in your template
in the widget.  There are other ways to get variables available, and
I believe that once you've passed a value in it gets propagated to any
widgets in a widget set.  I have gotten in to the habit of passing my
page templates both a 'values' dict to go into the forms and a 'params'
dict, which I pass in to the form itself via display(values, **params).
The same should work for non-form widget sets I would think, but I
haven't tried that.

--David

--~--~---------~--~----~------------~-------~--~----~
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