[Zope] Easy DTML way for layout.

Kees de Brabander cj.de.brabander@hccnet.nl
Sat, 9 Mar 2002 13:34:40 +0100


Give each page a property 'pagenumber' containing -you guessed it- its
pagenumber, create a list 'pages' consisting of all your pagenumbers and use
something like:
<dtml-in pages>
  <dtml-if "_['sequence-item'] == pagenumber">
    <b>page <dtml-var pagenumber></b>
  <dtml-else>
    page <dtml-var pagenumber>
  </dtml-if>
</dtml-in>

hth, cb

----- Original Message -----
From: "Jordan Katz" <katz@underlevel.net>
To: <zope@zope.org>
Sent: Saturday, March 09, 2002 7:27 AM
Subject: [Zope] Easy DTML way for layout.


> Hello,
>
>   I ran into a problem with Zope.  I'd like to use it to create a
>   consistent layout for a midsize webpage.  The layout is very simple;
>   I'd like Zope to insert the same header, body and footer for all
>   pages with minor color differences that can be handled by CSS.  The
>   header will contain a tool bar--for example, a simple table with
>   links in it.  Then my standard_html_footer or whatever I choose my
>   DTML footer tag to be will look like this:
>
>     <dtml-var css-code>
>     <dtml-var toolbar-code>
>
>   This is where I have a difficulty; what if I want my toolbar to have
>   a minor difference from every page?  For example, what if when page
>   1 is visited, I'd like the page 1 link to be in bold?  I could make
>   a ton of different dtml-vars for each part of the toolbar but that
>   would take a ridiculous amount of time, if it works at all, and
>   defeat the whole purpose of using Zope for the easier layout.  I'm
>   sure there's a "standard" solution to this--how can I achieve such
>   easy consistent layout in Zope?
>
> Thanks a lot,
> --
> Jordan Katz <katz@underlevel.net>  |  Mind the gap
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>