Thanks,
it works. I placed it into models directory. Is that right?
Julius
V Pondelok, 26. apríl 2010 o 17:05 -0700, mdipierro napísal(a):
> Something like
>
> def build_menu()::
> root=0 # assumes the root has parent_id=0
> keys={root:UL()}
> items=db(db.category.id>0).select(orderby
Something like
def build_menu()::
root=0 # assumes the root has parent_id=0
keys={root:UL()}
items=db(db.category.id>0).select(orderby=db.category.parent_id|
db.category.name)
for item in items:
keys[item.id]=ul=UL()
keys[item.parent_id].append(LI(A(item.name,_hre
... sorry - I meant models/menu.py, of course...
On Apr 26, 12:31 pm, Julius Minka wrote:
> I have to implement following 4-level menu in my view:
>
>
> Level1a
> Level1b
> Level1c*
>
> Level2a*
>
> Level3a*
>
>
did you look at your controller/menu.py file?
You should be able to see how to generate this dynamically;
On Apr 26, 12:31 pm, Julius Minka wrote:
> I have to implement following 4-level menu in my view:
>
>
> Level1a
> Level1b
> Level1c*
>
> Level2a*
>
> Level3a*
>
4 matches
Mail list logo