>   Are you saying it is getting rendered even when the "if" condition is 
> False?
>

Yes, this is what happens.

Despite session.cal.lesrooster, session.cal.event_list and 
>> session.cal.cursusrooster being False, site/calendar.html is being 
>> included. When I replace {{include 'site/calendar.html'}} with <p>text</p> 
>> the text isn't displayed.
>>
>> When I move the condition to site/calendar.html, the behaviour is the 
>> same, only when I have the condition both in the view and in 
>> site/calendar.html the page is rendered correctly.
>>
>> site/index.html:
>>
>> <div class="span4 box box-pad radius-small">
>>   {{if session.cal.lesrooster or session.cal.event_list or 
>> session.cal.cursusrooster:}}
>>     {{include 'site/calendar.html'}}
>>   {{pass}}
>>   {{include 'site/promoUnit.html'}}
>>  </div> <!-- /span -->
>>
>> site/calendar.html:
>>
>> {{if (session.cal.lesrooster or session.cal.event_list or 
>> session.cal.cursusrooster):}}
>>   <ul class="nav nav-tabs">
>>     ...
>>   </ul>
>>  
>>   <div class="tab-content">
>>     ...
>>   </div> <!-- /tab-content -->
>>
>>   <script type="text/javascript">
>>    ...
>>   </script>
>> {{pass}}
>>
>

Annet 

Reply via email to