[triangle-zpug] December 8 Trizpug meeting

Ben Best bbest at duke.edu
Fri Dec 17 18:38:42 CET 2004


CC: triangle-zpug at python.net

Hi Geoff,

That definitely looks to be the simplest, most elegant method for including
a PHParser script in Plone!  I've commented the previous links to the
presentation (http://trizpug.org/Members/bbest/links1204) with this info.  

Do you happened to have any ideas how to also replace the title (referenced
in header file, html_header macro by main_template)?

Thanks, Ben


> Hi Ben--
> 
> I saw this on the plone-users mailing list and thought you 
> might find it interesting.  It might be a good way to 
> simplify some of your PHP-to-Plone code.
> 
> Geoff
> 
> Subject:      Re: The joys of PHPParser and DTML...
> From:         Cyrille Bonnet
> <cyrille-Toc+CsdMLMJBDgjK7y7TUQ at public.gmane.org>
> Newsgroups:   gmane.comp.web.zope.plone.user
> Date:         Fri, 17 Dec 2004 15:41:22 +1300
> 
> I'll answer my own question :-)
> 
> create a ZPT under Plone like this:
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
>        metal:use-macro="here/main_template/macros/master">
> <head>
> </head>
> <body>
>    <tal:block metal:fill-slot="content" content="here/myphpscript">
>    </tal:block>
> </body>
> </html>
> 
> Where myphpscript is your PHParser script.
> 
> 
> Thanks to Wei He for his help.
> 
> Cyrille.
> 
> Cyrille Bonnet wrote:
> > Hi all,
> > 
> > So far, I have happily stayed away from DTML. Now, however, 
> I need to 
> > integrate some PHP scripts in my Plone application and I am 
> looking at 
> > PHPParser.It provides me with a DTML document where I can 
> put the PHP 
> > scripts.
> > 
> > It works great, but does not have the Plone header, footer, 
> left and 
> > right slots that come with main_template.
> > 
> > Essentially, I am trying to display my DTML document in Plone, and 
> > that's where my knowledge of DTML is too limited.
> > 
> > With a ZPT doc, I would create a new archetype "phpScript" and
> associate 
> > the ZPT with the "view" action.
> > 
> > Is it possible to do the same thing with a DTML doc? Is it 
> documented 
> > anywhere?
> > 
> > Any help or suggestion would be appreciated.
> > 
> > Cheers.
> > 
> > Cyrille
> > 
> 
> 




More information about the triangle-zpug mailing list