Thursday, May 26, 2011

Re: nested template tags

Heya,
I'm not 100% sure if this solves the problem for you (or if it's even
intended to do what you want) but:

{% with old_i=i %}
<a href="?{{ current_qstring|qstring_set:'page={{ old_i }}' }}">{{ i }}</a>
{% endwith %}

Haven't tried that yet but could be worth a shot.

https://docs.djangoproject.com/en/1.3/ref/templates/builtins/#with


On Thu, May 26, 2011 at 9:08 AM, ozgur yilmaz <yelbuke@gmail.com> wrote:
> Hi,
>
> I want to use an expression like this:
>
> <a href="?{{ current_qstring|qstring_set:'page={{ i }}' }}">{{ i }}</a>
>
> The first {{ i }} is in another tag. is there any way to manage this problem?
>
> Thanks,
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
>

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

No comments:

Post a Comment