[Twisted-web] operating on literals in nevow html templates

Joe Bowers joe at seventy-twodpi.com
Mon Apr 12 14:59:02 MDT 2004

I'm using Nevow along with designers who use a 
WYSIWYG HTML editor, and it's working like a dream!
However, I've run into an interesting scenario,
and I was wondering if anyone has any advice or
best practices to recommend.

I would like to perform a transformation
something like the following in my completed

<a href="GUI_GENERATED_CALL(garbage, 'WindowName', 'WindowParams')"
   >Click here for a popup</a>


<a href="dynamicCall('dynamicData', 'WindowName', 'WindowParams')"
   >Click here for a popup</a>

It's acceptable for me to bend, fold, or otherwise
mutilate the designer-provided tag to some degree, so
something like:

<a href="GUI_GENERATED_CALL(garbage, 'WindowName', 'WindowParams')"
   nevow:data="{'name' : 'WindowName', 'params' : 'WindowParams'}"
   >Click here for a popup</a>

would be fine- but the literal parameters I need to
preserve need to be under the control of the designers
and present in the template rather than in the code.

Any advice or pointers on how this sort of thing 
should be handled?

Thanks for your help!

Joe Bowers
Technical Director
Seventy-two dpi

828.252.2408 [x308]
joe at seventytwodpi.com

More information about the Twisted-web mailing list