On Saturday 05 May 2007 23:02, W-Mark Kubacki wrote:
> 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.Yes, thanks :o) > > 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. Ok, I see. > > 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). For example, it is usefull for a navigation toolbar that comes on every page. Am I right ? -- Frédéric http://www.gbiloba.org
pgpL4rlBZLtWg.pgp
Description: PGP signature

