[Zope] ZPT & passing around options...

Edward Muller edwardam@interlix.com
10 Sep 2002 00:56:01 -0500


--=-hy2ntTFMRclLs/wj0zDy
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hello All...

I have a problem that I haven't found a 'good' solution for.

I use what I cann RPZN (Reverse Polish Zope Notation) when developing
sites. RPZN is where you use one master template index_html in the root
of your zope install. Thist master index_html file provides the layout
for the entire site and includes (in my case) at least one reference
like this:
<div tal:content=3D"structure here/content" class=3D"content">
  Content
</div>

This way each folder you create needs to only have a 'content' object
(either a file, DTML Method or Document), which includes only the
content for that folder. This makes adding to the site really easy. Want
more content, add a folder, create a 'content' object and fill it in.
The entire site look'n'feel is maintained in one place and that's
/index_html.

This has worked great for some time, until now. :-(

Because of my design, in a Python script I need to call something like:
  return container.content(variable1=3D"sometxt", var2=3D["text1","text2"])

This ends up calling the local content, without the surrounding site
look'n'feel, <html> tags ... and the rest ... which is bad ...

And ... calling index_html like so:
  return container.index_html(variable1=3D"sometxt",
var2=3D["text1","text2"])
(line may be wrapped)

works fine wrt the site loook'n'feel and structure and all ... but the
variables I pass into index_html get passed to the local content object,
which is what I need to do.

Anyone know how to do this? I spent some time looking around and I
couldn't find an answer.

Help!=20

Thanks in advance ... I'd be happy to clarify anything above if it
helps.

--EAM

--=-hy2ntTFMRclLs/wj0zDy
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQA9fYlxrFLxV7skhR0RAuNxAJ9vDAXpLNtP+L0TpzV/chI5ifR7dwCfVjq5
MZM7+Jzfzc9mJh+jdOYspx4=
=8noG
-----END PGP SIGNATURE-----

--=-hy2ntTFMRclLs/wj0zDy--