Posts[] posts;
Var count=1; // If your code does not include a counter define one
While (count < posts.length) // Increase the value of "count" by 1 until the final post in the database
{
If (count%3=0) //If the value of "count" equals 3 or 6 or 9 insert the ad
{
}
{{ post.title }}
// for all count values insert the content block title
{{ post.body }}
//Insert the content block body
//Insert the content block image
}