I cannot reproduce the problem. If I create a condition that fails, the 
content of the included file does not display. Are you absolutely certain 
the condition is evaluating to False and/or the content in question is 
being included? Maybe pack and attach a minimal app that reproduces the 
problem.

Anthony

On Friday, July 6, 2012 1:01:13 PM UTC-4, Annet wrote:
>
>
>   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