Hello,

I can try to answer your first 2 questions:

1.  It looks like the parameters are (based on the example in the
book):
 - 1st parm (Item Text - 'One'): The text you want to show for the
item, so the list item will render with the text of: One

 - True | False: True means that web2py will apply a CSS class called
"web2py-menu-active" on the items

 - 3rd parm (href parm - 'link1'):  This is the href attribute to tell
the browser what to do when the list item is clicked (part of the
anchor tag).  So in the example, if they click on 'One', they will be
directed to the reference 'link1'.  You could put a reference to a
controller here if you want it to do something special.

You can see what happens if you just create a simple controller that
just creates a MENU and then look at the HTML that is rendered on the
view.

2.  I think the double brackets are needed, I tried with single
brackets and got an error.  If you are referring to the second
example, the brackets are there since one is a nested submenu.

3.  I defer :)

Hope this helps!


On Oct 13, 5:58 pm, Stef Mientki <stef.mien...@gmail.com> wrote:
>  hello,
>
> thanks to you all I got the left sidebar menu working, great !!
>
> Still a few questions :
>
> 1. In chapter 5, it says, each MENU item takes 3 parameters "as described in 
> chapter 4",
> but I can't find the description of these parameters, where should I look,
> and more what does that second parameter "False" mean ?
> And that raises the next question, it it's (almost) always False, can't it be 
> a keyword argument
> that might be left out ?
>
> 2. why so many square brackets ?
> ( I think it can be done with one less)
>
> 3. I love the "append" (and probably other methods)  of the Helpers, really 
> beautiful !!
> Why does Menu not allow these methods ?
>
> thanks,
> Stef Mientki

Reply via email to