My favorite way is to support this is to create skins. We have two skins: printable emailable that fixes the standard_html_* stuff, and can even be used to override the content rendering at a deeper level, if needed (overriding document_view etc). We can use the same way to support WAP, Avantgo etc also. A printable version of a page is simply done by doing http://myurl/contenturl?portal_skin=printable Pretty cool. IMO, this is a better use of skins than to use it for languages; languages are better managed by Localizer or ZBabel. Bye, -- Bjorn <bjorn@exoweb.net>
-----Original Message----- From: Chris McDonough [mailto:chrism@digicool.com] Posted At: Sunday, October 07, 2001 04:53 Posted To: Zope Developer Conversation: [Zope-dev] Emailing html web pages: how can I render page as the anonymous user? Subject: Re: [Zope-dev] Emailing html web pages: how can I render page as the anonymous user?
Hi Don,
Instead of including the rendered standard_html_header and standard_html_footer in the emailed page, why not have a "emailed_html_header" and "emailed_html_footer", which are prerendered copies of a toolbar and other things as seen by the anonymous user?
The setuid/setgid thing is tricky and since the outcomes will be about the same (always showing folks an anonymous-based toolbar), including static content is easier.
- C
Don Hopkins wrote:
I'm using the CMF, and I've implement an "email_this_page" method, that prompts for an email address, then uses the sendmail tag to email the html contents of a page, like yahoo and other sites commonly do. I want to include the standard_html_header and standard_html_footer in the email message, so it's easy for the recipient to navigate to the web site. But when I tested it out, I noticed I got all the management buttons like "Reject" and "Reconfigure portal" in the email message! Of course they required authentication, but it'd rather render the page as it would be seen by the anonymous user.
What I need is something like the effect of a setuid/seteuid system calls, that temporarily downgrades the Zope user to anonymous, while it renders the html headers and footers. As a stab in the dark, I tried changing the proxy role of the dtml script that uses the sendmail tag and renders the html, but I still got the management buttons. Is it as simple as temporarily changing some properties of the request? Or is there an extension or product that can do that? Thanks!
http://www.WorldTradeCenterDisaster.com:8080/Memorial
-Don
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )