Thang Nguyen schrieb:
> Hi Diez,
> thanks for your email. You're correct I was using an invalid context
> object. After fixing the bug, I was able to display the tree properly.
>
> I have another question regarding to generating the tree dynamically.
> Instead of having navTree div defined statically in the template (as in
> TG tutorial example), I have a python xml string object (mytext) in my
> controller (root.py). This string can potentially be
> created dynamically, but for now i have it predefined. I pass this
> string to the template (about.html). For some reasons, it does not seem
> to work as the way I expected. My browser just shows the actual text
> of "mytext", but not a tree. Any suggestion for me to try? Below are
> code from my root.py and about.html. Thanks much.
Genshi will escape strings, unless told otherwise. The solution I'd chose is
<div py:strip="True" # remove this node
py:content="XML(tree)" # make sure the XHTML is used literal
>
Diez
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---