On Mon, 17 Jul 2006, Jorge Godoy wrote:

> Donald Ball <[EMAIL PROTECTED]> writes:
>
>> That would work, but the formatting for the polls and their results need
>> to be easily customizable. That's far, far easier to do if I'm using kid
>> templates than if I'm constructing the HTML tree client-side. My page
>> designers can handle editing kid, asking them to edit javascript functions
>> isn't realistic.
>>
>> (Also, stylistically, I mislike requiring a javascript interpreter to
>> render the page. I like my webapps to still function in the absence of
>> one. But that's just me being pedantic.)
>
> What I do here is using Kid's "fragment" option and then using innerHTML on
> the JavaScript side.
>
> Something like:
>
>    @turbogears.expose(fragment = True, html = 
> 'marketwatch.templates.some_example')
>    def fragment_returning_method(self, *args, **kwargs):
>        return dict(form = my_form)

that's a good solution. two questions occur. one, is there a way to choose 
to fragment dynamically? tg_fragment in the returned dict has no effect. 
also, is there a way to access the fragment datum from the kid template, 
so that i could use py:if and py:strip to inhibit chunks of the page if 
it's being rendered as a fragment?

- donald

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

Reply via email to