Re: conditional block tag

2007-05-24 Thread Trey
Right, but if you will notice there is more than just the text in the block. So if I didn't put anything in the header block I would have to include the DIV with the id=header each time as opposed to just the block with my header text. On May 24, 2:06 am, Michael Newman <[EMAIL PROTECTED]> wrote

Re: conditional block tag

2007-05-24 Thread Trey
No, I have tried that and it looks for a header variable in your template context. It doesn't check if the block exists. On May 23, 11:15 pm, David Robinson <[EMAIL PROTECTED]> wrote: > I'm probably missing something about your question, and please excuse me > if that's the case, but wouldn't you

Re: conditional block tag

2007-05-23 Thread Michael Newman
You can also not put anything inside of the {% block header %} and then when nothing is provided nothing will show up. On May 23, 11:15 pm, David Robinson <[EMAIL PROTECTED]> wrote: > I'm probably missing something about your question, and please excuse me > if that's the case, but wouldn't you b

Re: conditional block tag

2007-05-23 Thread David Robinson
I'm probably missing something about your question, and please excuse me if that's the case, but wouldn't you be able to do this: {% if header %} {% block header %}Page Heading{% endblock %} {% endif %} Dave Trey wrote: > I have an interesting case that I would like to get some input on

conditional block tag

2007-05-23 Thread Trey
I have an interesting case that I would like to get some input on, perhaps I am just thinking about it incorrectly. It seems useful to have a conditional statement which will check to see if a child template has populated a block. {% block header %}Page Heading{% endblock %} If the bl