On Wed, 30 Apr 2008 17:21:47 -0700 (PDT)
Jay <[EMAIL PROTECTED]> wrote:

> 
> Hi, guys.  I'm working with a paginator templatetag, and I'm trying to
> apply a custom style to the current page.
> 
> In the code below, page.number renders *outside* the forloop, but not
> *inside* the forloop.
> 
> {{ page.number }} << this one renders, but the next page.number does
> not.
> {% for page in page.object_list %}
> <span class="{% ifequal page.number forloop.counter %}current{% else
> %}page{% endifequal %}">
> {{ forloop.counter }}
> </span>
> {% endfor %}
> 
> How can I get that page.number inside the loop?
> 

It's a bit hard to tell what's going on without the template tag, but
it appears you have a name collision.

-- 
Lucas Hazel <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to