5
The usual thing is that foreach loops have no name.
You need to assign a name to posts loop. Like this:
{foreach name=myname item=myitem from=$myarray}
An example:
http://www.marruecosdigital.net/xoops/modules/wfsection/
You have an ad after 3rd item.
The loop begins with:
Quote:
<{foreach name=featureloop item=feature from=$features}>
and just before reaching loop end, is this code:
Quote:
<{if $smarty.foreach.featureloop.iteration == 3}>
... code that inserts the ad here ...
<{/if}>