block inside if condition

Notice: This thread is very old.
smutko8882
Member | 4
+
0
-

Is there some problem to put {block} inside {if} condition ? if the condition is true everything works and the block body is replaced with the @bodySecure.latte but if the condition is false my page disappears instead of use @layout.latte and other blocks. Am I missing something?

{layout '@layout.latte'}

{? $title = $page->$title_col}
{? $description = $page->$description_col}
{? $keywords = $page->$keywords_col}

{if 1==2}
    {block #body}
        {include '@bodySecure.latte'}
    {/block}
{/if}

{block #content}
        <div n:foreach="$flashes as $flash" class="flash {$flash->type}">{$flash->message}</div>

	{block #pageHeader}
		<div class="capacity-header">{$page->$header_col}</div>
	{/block}

		{block #pageContent}{/block}

<div class="clear"></div>
{/block}