I’ve read many times that
{if condition1}
do this
{/if}
{if condition2}
do that
{/if}is better than
{if condition1}
do this
{if:elseif condition2}
do that
{/if}because in the first example only the queries inside the true condition will run, whereas in the second example both sets of queries will run.
But I have a template like this:
{if segment_2==""}{/if}
{if segment_4!=""}{/if}
{if segment_2=="category" AND segment_3!="" AND segment_4==""}{/if}And if I am looking at a page where {segment_2==""}, debugging tells me I have 235 queries.
If I completely remove the second two if statements and everything inside them, I have 46 queries.
Have I misunderstood what should happen?