[Zope] Inserting headers and footers in response messages
Steve Spicklemire
steve@spvi.com
Sun, 25 Nov 2001 20:00:39 -0500
Bruce,
I've not done exactly this but you might try:
from Globals import HTML
def foo(self):
self.REQUEST.RESPONSE.setHeader('content-type', 'text/html')
return HTML('''<dtml-var standard_html_header>
<h1 color="red">Invalid email address:
please press your browser's 'back' key and correct
it</h1>
<dtml-var standard_html_footer>
''')(None, REQUEST)
Good Luck!
-steve
On Sunday, November 25, 2001, at 02:29 PM, Bruce Eckel wrote:
> Inside an external method, I'm doing this:
>
> self.REQUEST.RESPONSE.setHeader('content-type',
> 'text/html')
> return '''<dtml-var standard_html_header>
> <h1 color="red">Invalid email address:
> please press your browser's 'back' key and correct
> it</h1>
> <dtml-var standard_html_footer>
> '''
>
> I'm not really surprised that standard_html_header and
> standard_html_footer aren't being expanded in the result, but I
> wonder if there's a way to do it?
>
>
>
> Most current information can be found at:
> http://www.mindview.net/Etc/notes.html
> ===================
> Bruce Eckel http://www.BruceEckel.com
> Contains free electronic books: "Thinking in Java 2e" & "Thinking
> in C++ 2e"
> Please subscribe to my free newsletter -- just send any email to:
> join-eckel-oo-programming@earth.lyris.net
> My schedule can be found at:
> http://www.mindview.net/Calendar
> ===================
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )