durusmail: quixote-users: Header and footer PTL Plug-in?
Header and footer PTL Plug-in?
2005-11-07
2005-11-15
Header and footer PTL Plug-in?
Shalabh Chaturvedi
2005-11-07
I'm trying to write Quixote applications that can be re-used easily. So
I do not want to bind the PTL templates tightly with my site header,
footer and other standard 'pieces' of a page. My current strategy is to
use:

import pageui

def someview [html] ():
     pageui.header()

     ...

     pageui.footer()

And not include pageui.ptl in this package at all. The user of this app
then has to create pageui.ptl and make sure it is in the pythonpath.
This allows me (and others) to re-use the application with different
headers, footers and such.

1. Is this a good approach?

2. Is there value in standardizing the 'pageui' API? For example I end
up using not just header() and footer() but also msg_box(msg),
link_button(label, target) and other such components.

--
Shalabh

reply