[Milton]
> In my case I want to place an adsense ad between a couple of blog
> posts though want to make sure that I don't go over the 3 ads per page
> limit.

It's usually better practice to put rules like this into your Python code
rather than your template.  Make your template say something like:

    {% if blog_post.allow_ad %}<insert ad code>{% endif %}

and do something like this in your Python code:

    for i, blog_post in enumerate(blog_posts):
        blog_post.allow_ad = (i < MAX_ADS_PER_PAGE)

-- 
Richie Hindle
[EMAIL PROTECTED]

Reply via email to