Hi Joe,

The code in the view works:

<ul>
  {{if not response.menu:}}
    <li><a href="{{=URL(r=request,f='browse')}}">Browse</a>
    <li><a href="{{=URL(r=request,f='sign_up')}}">Sign up</a>
  {{else:}}
    {{for _name,_active,_link in response.menu:}}
      <li>
        <a {{if _active:}} class="active" {{pass}}
href="{{=_link}}">{{=_name}}</a>
      </li>
    {{pass}}
  {{pass}}
</ul>


However, when trying to reproduce the problem I noticed the following:
given this menu:

response.menu=[
    ['Index',request.function=='index',URL(r=request,f='index')],
    ['Mock_a',request.function=='mock_a',URL(r=request,f='mock_a')],
    ['Mock_b',request.function=='mock_b',URL(r=request,f='mock_b')]]

there's no problem, however, when I remove response.menu, and expose a
function, I get the ValueError you got. Now when I set
response.menu=[], and expose the function, the view is displayed as
expected.

I can't account for this behaviour but I hope this observation will
help you solve the problem.


Kind regards,

Annet.

Reply via email to