I'm not sure if you are on TG 1.x or the 2.x series.
If you are using TG 1.x then the way to do it looks something like this:
@expose(template="template1")
def myfunction(self, some_var):
....
return_data=dict(var1=var1,var2=var2)
if some_var:
return_data['tg_template']='template2'
return return_data
Kalium wrote:
> Hi,
> I'm looking for a way to have one controller render more than one
> template. I'm not looking to dynamically _change_ which template I'm
> using, I just want to be able to use the same two templates always.
>
> I could of course just combine the two templates into one template and
> all my problems would be solved. I would rather though keep them
> seperate. This makes it much easier to reuse one in a place I may not
> want to use the other.
>
> Any Ideas?
>
> Cheers
>
> >
>
>
--
David Gardner
Pipeline Tools Programmer
Jim Henson Creature Shop
[email protected]
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---