Re: inclusion tag variable resolving

2010-05-24 Thread Dennis Kaarsemaker
On ma, 2010-05-24 at 13:49 -0700, christian verkerk wrote: > i made an inclusion tag for making an image button of varying widths, > which i call through: > > {% make_button 'click me' item.get_absolute_url %} > > i then resolve the second param in context for the button link, > however i would l

Re: inclusion tag variable resolving

2010-05-24 Thread Scott Gould
Can you not simply pass foo: {% make_button 'click me' foo %} ... resolve it, and then use either its .get_absolute_url() or something other url, depending on what foo is? The inclusion tag's python code is far more equipped to deal with logic decisions, special cases, etc. than the template is.

inclusion tag variable resolving

2010-05-24 Thread christian verkerk
i made an inclusion tag for making an image button of varying widths, which i call through: {% make_button 'click me' item.get_absolute_url %} i then resolve the second param in context for the button link, however i would like to be able to do something along the lines of: {% make_button 'click