Frédéric schrieb: > > Do you have an example how to integrate several widgets in a single page? > Do I just need to give these differents widgets in the dict returned by > the controller method?
For the latter: Yes, you just return them in your dict:
return dict(rsphoto=resizeable_photo_widget,
big_pic=big_picture_widget,
...
photo=MyImageModel.get(1),
pic=MyImageModel.get(2))
Then, in your template, you just display() the widget with the photo or
any other variable part. Such like this:
${big_pic.display(image=pic)}
You got the idea.
>
> Is it possible from a widget to load other widgets?
Yes, with CompoundWidgets. But you have to define which widgets will be
utilized by that widget. See docs.
>
> What are the good practices for widget use?
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).
-- Mark
smime.p7s
Description: S/MIME Cryptographic Signature

