In a view I have the following lines of code.
{{if 'promobox' in globals():}} <div class="sidebox"> {{if promobox[0].kop:}} <h3>{{=promobox[0].kop}}</h3> {{pass}} {{=XML(promobox[0].tekst)}} </div> <!-- sidebox --> {{pass}} when I expose a function that does not return a promobox I get the following error: Traceback (most recent call last): File "/Library/Python/2.5/site-packages/web2py_1.87.3/gluon/ restricted.py", line 188, in restricted exec ccode in environment File "/Library/Python/2.5/site-packages/web2py_1.87.3/applications/ cms/views/card/index.html", line 125, in <module> TypeError: 'function' object is unsubscriptable where line 125 reads like: if promobos[0].kop I don't understand why I get this error, the code between {{if 'promobox' in globals():}} and the last {{pass}} shouldn't be executed, should it? Regards, Annet