I have the following code as an include with PHP enabled on output but am having problems with the plugin being processed twice and throwing errors. It seems that the imgsizer plugin is parsed before the IF..THEN statement.
{assign_variable:my_template_group="car-leasing-contract-hire"}
<div class="grid-row">
{exp:weblog:entries weblog="offers" site="plancars" disable="categories|member_data|pagination|trackbacks" sort="asc" orderby="offers_payment" show_expired="no" show_future_entries="no" rdf="off" {if embed:max_offers}limit="{embed:max_offers}"{/if} dynamic="off" {if embed:entry_id}entry_id="{embed:entry_id}"{/if} status="{embed:the_status}" {if embed:cat_id}category="{embed:cat_id}"{/if} }
<div class="grid-item {switch='one|two|three'}">
<div class="grid-image">
<a href="http://{url_title_path={my_template_group}/vehicle}">_ {if offers_image}_ {exp:imgsizer:size src="{offers_image}" width="167" quality="90" alt="{title}"}_ {if:else}_ {related_entries id="offers_car"}_ {exp:imgsizer:size src="/images/cap/{imagefile}" width="167" quality="90" alt="{make} {lmodel}"}_ {/related_entries}_ {/if}_ </a>
</div>
<div class="grid-copy">
<a href="http://{url_title_path={my_template_group}/vehicle}" class="gridtitle">{title}_</a>
<a href="http://{url_title_path={my_template_group}/vehicle}" class="gridco2">{related_entries id="offers_car"}CO2 {co2} g/km » Eco Band {if co2<=100}A{if:elseif co2>100 AND co2<=120}B{if:elseif co2>120 AND co2<=150}C{if:elseif co2>150 AND co2<=165}D{if:elseif co2>165 AND co2<=185}E{if:elseif co2>185 AND co2<=225}F{if:else}G{/if}{/related_entries}_</a>
<a href="http://{url_title_path={my_template_group}/vehicle}" class="gridprice">£{offers_payment}</a> per month
</div>
<div class="clear"><!----></div>
</div>
<?php if (fmod({count},3) == 0 && {count} != {total_results}) { ?></div>{if count == 6 }{embed="includes/newsletter" }{/if}<div class="grid-row"><?php } ?>
{/exp:weblog:entries}
</div>Is this correct behaviour and what alternatives have I got as I can’t seem to find a way around this?
EE 1.6.8 with MSM.
Stuart