On Jul 15, 9:10 pm, "Matic Žgur" <[EMAIL PROTECTED]> wrote:
> is there a way to pass an argument from urls.py to inclusion tag?
>
> For example, if I have a custom inclusion tag that prints some links
> to some pages and I don't want it to print the link to the page I'm
> currently visiting, how would I do it?
>
> Let's say that I'm visiting a page /posts/2008. On the bottom of this
> page, there are links (produced by this inclusion tag) to /posts/2007
> and /posts/2006 but also to /posts/2008 since it doesn't know I'm
> already visiting this page. I was thinking about passing argument from
> urls (2008) and make it not print this link, but I don't know how?
>
> Does anyone have any suggestion how to solve this?

If i understand you correctly, you can just pass a variable to the
template from the view and pass that variable as a parameter to your
inclusion tag.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to