[ZPT] Newbie ... Hi to all and questions

Lynn Walton waltonl@franklin.edu
Wed, 30 May 2001 14:53:14 -0500


Hello,

I'm new to zope and zpt.  I've decided to use zope for a new website
rollout at the University where I'm employed.
Although I think dtml looks easier to understand (and has better
documentation) I'm inclined to think ZPT is a better way to go, worth
the investment to learn. Of course I'm a little concerned about whether
it's ready enough for production but we probably won't get to production
for a couple more months.

First let me say thanks to Evan for all his work on this project.  Keep
that documentation coming! <g>
And thanks to Peter B, for the many examples and docs you've provided so
far.

Two things now.
1) When I import the zpt_examples into the root folder on my zope
installation and try the batch example, the link for the Next 3 doesn't
seem to work.  It takes me to my root directory's index.html (which in
my case is still the default zope quick start screen).   Is this a bug
or am I not understanding it?

2) Although we intend to get into content management aspects, and other
powerful zope features later, the first thing I need to do to get my
team working is to be able to provide our standard look and feel so that
we can start making our "static" like pages (ones that aren't data or
logic dependent that is).  Our standard look & feel would include the
html, head (where we want to be able to insert different javascripts in
different pages) body, opening table, tr, td with our left hand
navigation, td that would represent the area that different in each page
so I would imagine this would be a define-slot in the master template,
then all the appropriate closing tags.

Two questions I have ... is there a way to do something like this from
http://www.zope.org/Members/Caseman/client_script_howto

Next, we modify our friend and ally standard_html_header so that it
inserts scripts for any documents that request them. Simply insert the
DTML code below within the <HEAD> section of your standard_html_header.

                          <dtml-if scripts>
                              <dtml-comment>
                                   Include Java Scripts Specified by
Scripts Property
                              </dtml-comment>
                              <META HTTP-EQUIV="Content-Script-Type"
CONTENT="text/javascript">
                              <SCRIPT language="JavaScript"><!--
                              <dtml-with java_script>
                                  <dtml-in scripts>
                                      //
                                      // Script of <dtml-var
sequence-item>
                                      //
                                      <dtml-var
"_.getitem(_['sequence-item'],1)">
                                  </dtml-in>
                              </dtml-with>
                              //--></SCRIPT>
                          </dtml-if scripts>

but in a master template?

2) Can someone show me a simple example of how I would be able to have a
variable in each different page that is using the master template, tell
it which of the menu items (that are in the left hand navigation menu
contained in the master template ) to "highlight" where in this case by
"highlight" I mean just change in some "look and feel" way ... be it
adding a graphic next to it, changing the text font color, etc.

Or maybe a variable in each page isn't the way to do it ... ? I don't
know if a property for that document would be better?  But I would guess
that all the menu's would have to have some condition check to determine
if it's the one that is supposed to be highlighted.

All help greatly appreciated.

Thanks,
Lynn