You just need to move the {if} statement around a little:
Replace this:
Code:
{capture name=dialog}
{if $f_products ne ""}
{if $total_pages gt 2}
<br />
{ include file="customer/main/navigation.tpl" }
{/if}
{include file="customer/main/products.tpl" products=$f_products featured="Y"}
{if $total_pages gt 2}
<br />
{ include file="customer/main/navigation.tpl" }
{/if}
{else}
{$lng.txt_no_featured}
{/if}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_featured_products content=$smarty.capture.dialog extra='width="100%"'}
with this:
Code:
{if $f_products ne ""}
{capture name=dialog}
{if $total_pages gt 2}
<br />
{ include file="customer/main/navigation.tpl" }
{/if}
{include file="customer/main/products.tpl" products=$f_products featured="Y"}
{if $total_pages gt 2}
<br />
{ include file="customer/main/navigation.tpl" }
{/if}
{else}
{$lng.txt_no_featured}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_featured_products content=$smarty.capture.dialog extra='width="100%"'}
{/if}