Thanks for your reply. I had a look at the code, but I am afraid it doesn't solve my problem. The functions are fields in a table and depending on their value being true or false they should be rendered as an <a></a> or <h4></h4> element.
Given this code in a function: session.id=auth.user.bedrijf_id session.row=db(db.cardfunction.bedrijf_id==session.id).select(db.cardfunction.ALL) session.card_menu=[ ['Home',request.function=='index',URL(r=request,f='index')], ['Logo',request.function=='logo',URL(r=request,f='logo')], ... ['Keywords',request.function=='keywords',URL(r=request,f='keywords')]] .. I am looking for a way to make use of the _name attribute, for this is the same as the field name, something like: <ul> {{for _name,_active,_link in session.card_menu:}} {{if session.row._name:}} <li> <a {{if _active:}} class="active" {{pass}} href="{{=_link}}">{{=_name}}</a> </li> {{else:}} <li> <h4 class="disabled">{{=_name}}</h4> </li> {{pass}} {{pass}} </ul> The problem is that this: {{if session.row._name:}} results in a KeyError '_name' Is it possible to use _name to accomplish this? Kind regards, Annet.