Re: Custom Template Tag - Passing variable for use in tag processing

2009-01-29 Thread phoebebright
This is the final code which works in case it helps anyone else. Thanks again. In the template: {% page_links category %} In templatetags file @register.tag(name="page_links") def get_page_links(parser,token): tag_name, category = token.contents.split() return

Re: Custom Template Tag - Passing variable for use in tag processing

2009-01-29 Thread phoebebright
You understood perfectly. It was just another case of my not understanding the documentation. Your explanation makes perfect sense. Many thanks. On Jan 27, 6:45 pm, Eric Abrahamsen wrote: > On Jan 28, 2009, at 1:52 AM, phoebebright wrote: > > > > > > > I have duplicated as

Re: Custom Template Tag - Passing variable for use in tag processing

2009-01-27 Thread Eric Abrahamsen
On Jan 28, 2009, at 1:52 AM, phoebebright wrote: > > I have duplicated as best I can the processing for handling variables > in custom template tags mentioned in an earlier post but it's not > working for me as I need the value of the variable before I parse it. > Is there another way of making

Custom Template Tag - Passing variable for use in tag processing

2009-01-27 Thread phoebebright
I have duplicated as best I can the processing for handling variables in custom template tags mentioned in an earlier post but it's not working for me as I need the value of the variable before I parse it. Is there another way of making the variable available? The tag is being called from the