[Zope-CMF] Plone + zpt + python scripts: need help
Juan Pablo Romero
jpablo@kan.ajusco.upn.mx
14 Aug 2002 13:13:17 -0500
Hi
I think that the problem is this:
Zope decides what to do with a given file based on the file's type; If
you want tal expressions to be executed in a file, then the file needs
to be of appropiated type (page template).
When you add a document within plone, the document's type is not a page
template, but something else (plone specific). Thats why tal statements
doesn't get executed when you view the object.
If you want a page template that have the plone look, you'll have to use
the appropiated macros. In plone 1.0 alpha 2, when you add a plone site,
look for index_html. I think you could base your page template in that
file.
Juan Pablo
On Tue, 2002-08-13 at 16:22, alienoid wrote:
> Hello zope-cmf users,
>
> I need to write ZPT page inside Plone site. This page will call
> different python scripts.
>
> >From ZMI I add plone site.
> Inside plone side I create PloneFolder and inside that folder I add
> default page (I do it from plone site, not from ZMI to not break the
> skin) and python script from ZMI. After that I begin add in default
> page different TAL expressions that call my python script, but I can
> see that this page does not call my script. I have tried stub
> expression - <span tal:content="user/getUserName">TEST</span>, but it
> renders TEST and not user name. My simple python script returns just a
> string, but I can't see it.
> What am I missing? What should I do to call my script? (I use standard
> TAL expressions that works in plain Zope)
>
> Thanks in advance for your help.
>
> --
> Best regards,
> alienoid mailto:alienoid@is.lg.ua
>
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests