Re: Custom Template Tag with {% end... %} tag

2008-10-20 Thread Erik Allik
I guess it was easier for me to type it myself than search through the new documentation. :) Erik On 20.10.2008, at 5:49, James Bennett wrote: > > On Sun, Oct 19, 2008 at 4:20 PM, Erik Allik <[EMAIL PROTECTED]> wrote: >> In the compilation function of your template tag, you can force the >> p

Re: Custom Template Tag with {% end... %} tag

2008-10-19 Thread James Bennett
On Sun, Oct 19, 2008 at 4:20 PM, Erik Allik <[EMAIL PROTECTED]> wrote: > In the compilation function of your template tag, you can force the > parser to parse until tag named "endyourcustomtag" by calling nodelist > = parser.parse(("endyourcustomtag", ). This will return the contents > of your blo

Re: Custom Template Tag with {% end... %} tag

2008-10-19 Thread Siah
Thank you! Sia On Oct 19, 5:20 pm, Erik Allik <[EMAIL PROTECTED]> wrote: > In the compilation function of your template tag, you can force the   > parser to parse until tag named "endyourcustomtag" by calling nodelist   > = parser.parse(("endyourcustomtag", ). This will return the contents   > of

Re: Custom Template Tag with {% end... %} tag

2008-10-19 Thread Erik Allik
In the compilation function of your template tag, you can force the parser to parse until tag named "endyourcustomtag" by calling nodelist = parser.parse(("endyourcustomtag", ). This will return the contents of your block tag as a list of nodes. Finally you can "drop off" the end tag by ca

Custom Template Tag with {% end... %} tag

2008-10-19 Thread Siah
Hi, I can't understand how template tags such as if, for and ifequal manage to have an accompanying endif, endfor and endifequal, and I can't have it. Or I can't manage to find out how to do it. So, I basically want to do something like: {% customTag %} hello {% endcustomTag %} and within my cu