Thanks for taking the time for my problem. I couldn't find any good
example that shows how to make a nice menu. While trying different
solutions I made a mess of the code. But at the end I made this
solution:

{{
        submenu1=[
['item1',False,URL(r=request,f='item1')],
['item2',False,URL(r=request,f='item2')],
]

submenu2=[
['item3',False,URL(r=request,f='item3')],
['item4',False,URL(r=request,f='item4')],
]

response.menu=[
['header1',False,'#',submenu1],
['header2',False,'#',submenu2],
]}}




        {{###### superfish menu }}
        {{=MENU(response.menu,_class='sf-menu')}}
        <script>
                jQuery(document).ready(function(){
                jQuery('ul.sf-menu').superfish({delay:400});});
        </script>




On Sep 29, 1:23 pm, mdipierro <[email protected]> wrote:
> everything I see here appears correct. Can we see the generated html?
> Can you try load the page with firebug and see if you get any error?
>
> On Sep 28, 11:50 pm, Rick <[email protected]> wrote:
>
>
>
> > Hi,
>
> > I've put this into a viewer file named layout.html but it doesn't
> > work:
> >         <head>
>
> > {{response.files.append(URL(request.application,'static','superfish.js'))}}
> >                 {{include 'web2py_ajax.html'}}
> >         </head>
>
> >         ...some code
>
> >         {{
> >                 response.menu=[
> >                 
> > ('Home',request.function=='home',URL(r=request,f='home'),[]),
> >                 ('Store
> > Information',request.function=='info',URL(r=request,f=info'),
> >                 []),]
> >         }}
>
> > Thanks in advance for help!
>
> >         {{###### superfish menu }}
> >         {{=MENU(response.menu,_class='sf-menu')}}
> >         <script>
> >                 jQuery(document).ready(function(){
> >                 jQuery('ul.sf-menu').superfish({delay:400});});
> >         </script>

Reply via email to