Thank you guys! I will test it!

On Fri, Dec 9, 2011 at 3:11 PM, Bruno Rocha <rochacbr...@gmail.com> wrote:

> In that cases I prefer to keep the generators in server side.
>
>
> modules/html_helpers.py
>
> from gluon import DIV
>
> class MySidebar(DIV):
>     def __init__(self):
>         # do whatever you want
>         DIV.__init__(self)
>         self.append(H1("mysidebar"))
>         self.append(UL(*[LI().....]))
>
>     def myextramethod(self):
>         .....
>
> So in any cotroller I can do:
>
> from html_helpers import MySidebar
> return dict(sidebar=MySidebar(*params))
>



-- 

Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______

Reply via email to