I actually solved that in this release by having a placeholders mode where everything is output in placeholders. So each document is output as
There seem to be a few people who want to show 2 items, then an advert, then some more items, so this approach would save a lot of db hits.
[+item[x]+]