In a view I have the following code in the right column of the
content:
{{=LOAD('vcardadmin','index.load',ajax=True,target='component')}}
The vcardadmin controller contains the following menu:
response.admin_menu=[
['Home',request.function=='index',URL('index')],
...
['Theme',request.function=='theme',URL('theme')]]
Which I would like to be rendered like this:
<ul>
<li><a onclick={{="web2py_component('%s','component')"
%URL('vcardadmin','index.load')}}>Home</a></li>
...
<li><a onclick={{="web2py_component('%s','component')"
%URL('vcardadmin','theme.load')}}>Theme</a></li>
</ul>
Is it possible to adjust this code to get the above to work:
<ul">
{{for _name,_active,_link in response.admin_menu:}}
<li>
<a {{if _active:}} class="active" {{pass}}
href="{{=_link}}">{{=_name}}</a>
</li>
{{pass}}
</ul>