I have this simple template with 3 blocks:
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<!-- BEGIN headline -->
<tr><td width="18%">{TXT_PRODUCT_NUMBER}</td>
<td width="53%">{TXT_PRODUCT_DESCRIPTION}</td>
<td width="12%">{TXT_PRICE}</td>
<td width="15%">{TXT_QUANTITY}</td>
</tr>
<!-- END headline -->
<!-- BEGIN category -->
<tr>
<td width="100%" colspan="4">{VAR_CATEGORY}</td>
</tr>
<!-- END category -->
<!-- BEGIN products -->
<tr><td width="18%">{VAR_PRODUCT_NUMBER}</td>
<td width="53%">{VAR_PRODUCT_DESCRIPTION}</td>
<td width="12%">{VAR_PRICE}</td>
<td width="15%">{VAR_QUANTITY}</td>
</tr>
<!-- END products -->
</table>
After I've parsed the headline block I want to first parse the category-block once, then the producs-block multiple times. Then the category-block once again followed by the producs-block multiple times again (one category have many products).
What happens when I do this is that the blocks are displayed in the order they are defined in the template All the category blocks are displayed in order, then the product blocks.
Is there any way of making the template display the blocks in the order they are parsed, and not in the order they are defined in the template?