Frédéric schrieb: > >> Whenever you are to write the same HTML-code again in your template >> think about turning it into a widget. But don't make widgets for trivial >> things (e.g., a single IMG-tag). > > For example, it is usefull for a navigation toolbar that comes on every > page. Am I right ?
You are. In case of navigation toolbar, define it somewhere and display
it in your master template. E.g., "master.kid".
As you will probably not want to return that widget in *every*
controller, let that up to TG by altering your "app.cfg".
There is a handy widget for main menus in TGYUI [1,2].
from TGYUI.widgets import YUIMenuBar
-- Mark
[1] http://cheeseshop.python.org/pypi/TGYUI/0.1.0
[2] http://developer.yahoo.com/yui/menu/
smime.p7s
Description: S/MIME Cryptographic Signature

