Hi Anthony,
Thanks for providing me with this solution. I used it in the timetable
function as follows:
In the function: tab='tab-' + str(weekday)
In the view:
<div class="tab-content">
{{for i in xrange(1,8):}}
{{this_tab = 'tab-%s' % i}}
<div class="tab-pane" id="{{=this_tab}}">
{{if tab==this_tab:}}
{{=LOAD('calendar','daytimes.load',args=i,ajax=True,target=this_tab)}}
{{pass}}
</div> <!-- /tab-pane -->
{{pass}}
</div> <!-- /tab-content -->
<script type="text/javascript">
$(document).ready(function(){
$('a[href=#{{=tab}}]').tab('show');
});
</script>
In this case determining this:
{{if tab==this_tab:}}
{{=LOAD('calendar','daytimes.load',args=i,ajax=True,target=this_tab)}}
{{pass}}
... because the tab variable provides me with the tab that should be loaded
the first time the page displays. However, in the case your trying to help
me solve, I don't know which one is the tab that should be loaded the first
time the page displays, all I know is that it's the first tab. What I am
looking for is something to do the following:
tab='tab-' + the minimum value of i
Kind regards,
Annet