[Zope] DTML source

2000-11-23 Thread Tom Deprez

Hi,

Are there some sites which publish there DTML source(structure)? I'm
particulary looking on how several navigation, menu, ... structures are
implemented in Zope.

On Zope.org you can see the DTML-source. Unfortunately not the
implementation of the navigation (or the menu on the left).

Tom.



___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] DTML source

2000-11-23 Thread Oleg Broytmann

Hi!

On Thu, 23 Nov 2000, Tom Deprez wrote:
 Are there some sites which publish there DTML source(structure)? I'm
 particulary looking on how several navigation, menu, ... structures are
 implemented in Zope.

 On Zope.org you can see the DTML-source. Unfortunately not the
 implementation of the navigation (or the menu on the left).

   Russian Python and Zope User Group site: http://zope.net.ru/ The problem
is that it is really in russian (surprized? :)

   Horizontal navigation implemented in header, in method global-nav:
http://zope.net.ru/global-nav/view_source

   Vertical navigation in left column implemented with External Method.
Source will be freely available upon request (on first request I just put
the source on the site).
   External Method requires 'cause I need to play with aqcuisition,
recursion, etc - hardly achivable with DTML scripting.

Oleg.

 Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTECTED]
   Programmers don't die, they just GOSUB without RETURN.


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] DTML source

2000-11-23 Thread Dennis Nichols

At 11/23/00 01:38 PM, Tom Deprez wrote:
Are there some sites which publish there DTML source(structure)? I'm
particulary looking on how several navigation, menu, ... structures are
implemented in Zope.

I use the following DTML Method (probably shouldn't be done in dtml) to 
produce a vertical, indented menu where folders are expanded to subfolders 
only if you're in one of the subfolders. Three custom folders are used to 
build the site (Category-Top, Category-Middle, and Category-Bottom). Each 
folder has a menu_entry property. A folder appears in the menu only if its 
menu_entry is non-blank. If you are currently in Pop Culture/Reviews/Books, 
the menu looks like this:

Ask the Experts
College
Pop Culture
Quiz
Reviews
   Books
   Movies
   Music
Trends
Sports

Here's the dtml. It's called display_menu and is recursive. Replace 
home_id_here with the id of the site's base folder. The base folder does 
not appear in the menu display.

  dtml-unless topdown
dtml-call "REQUEST.set('topdown',[])"
dtml-call "REQUEST.set('homefound','n')"
dtml-in PARENTS skip_unauthorized
  dtml-if "homefound == 'n'"
dtml-call "topdown.insert(0, _['sequence-item'])"
dtml-if "_['sequence-item'].id == 'home_id_here'"
  dtml-call "REQUEST.set('homefound', 'y')"
/dtml-if
  /dtml-if
/dtml-in
dtml-call "REQUEST.set('level', 0)"
dtml-call "REQUEST.set('NodeToShow', topdown[0])"
  /dtml-unless
  dtml-if "level  0"
dtml-with NodeToShow
  dtml-var "'nbsp;'*3*(_.int(level)-1)"
  a href="dtml-absolute_url;" class=toolboxdtml-menu_entry;/abr
/dtml-with
  /dtml-if
  dtml-if "level  _.len(topdown) and NodeToShow.id == topdown[level].id"
dtml-in 
"NodeToShow.objectValues(['Category-Top','Category-Middle','Category-Bottom'])"
 sort=id skip_unauthorized
  dtml-if "_['sequence-item'].menu_entry"
dtml-call "REQUEST.set('level', level+1)"
dtml-call "REQUEST.set('NodeToShow', _['sequence-item'])"
dtml-var display_menu
dtml-call "REQUEST.set('level', level-1)"
  /dtml-if
/dtml-in
  /dtml-if

Not my finest piece of coding, but maybe it will help.

--
Dennis Nichols
[EMAIL PROTECTED]


___
Zope maillist  -  [EMAIL PROTECTED]
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 )




Re: [Zope] DTML source

2000-11-23 Thread Chalu Kim


Just don't put two of it into a page. You can have this problem when you use
frame sometimes.

Dany Rioux wrote:

 Hi Tom,

 There's a package for Zope called ZNavigation. I use it. It's very nice
 once you understand the basics. It's not very hard to use but it is a bit
 intimidating at first. I can't think of the link on top of my head but if
 you can't find it, get back to me, I'll do what I can to find it.

 HTH

 Dany

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Tom
 Deprez
 Sent: Thursday, November 23, 2000 8:39 AM
 To: [EMAIL PROTECTED]
 Subject: [Zope] DTML source

 Hi,

 Are there some sites which publish there DTML source(structure)? I'm
 particulary looking on how several navigation, menu, ... structures are
 implemented in Zope.

 On Zope.org you can see the DTML-source. Unfortunately not the
 implementation of the navigation (or the menu on the left).

 Tom.

 ___
 Zope maillist  -  [EMAIL PROTECTED]
 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 )


begin:vcard 
n:Kim;Chalu
tel;work:(212) 929-3087
x-mozilla-html:TRUE
url:www.egenius.com
org:eGenius, Inc  "Open-Source People"
adr:;;137 Varick Street, 6th FL;New York;New York;10013;US
version:2.1
email;internet:[EMAIL PROTECTED]
title:Chief Navigator
end:vcard



RE: [Zope] DTML source

2000-11-23 Thread Dany Rioux

Hmmm... Good point.

I don't use frames so I never encountered that behavior/bug/feature :) but
on non-frames it does wonders. I really like the way it can be used and
it's easy to modify.

Dany

 -Original Message-
 From: Chalu Kim [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 23, 2000 3:11 PM
 To: Dany Rioux
 Cc: Tom Deprez; Zope Mailing List
 Subject: Re: [Zope] DTML source



 Just don't put two of it into a page. You can have this
 problem when you use
 frame sometimes.

 Dany Rioux wrote:

  Hi Tom,
 
  There's a package for Zope called ZNavigation. I use it.
 It's very nice
  once you understand the basics. It's not very hard to use
 but it is a bit
  intimidating at first. I can't think of the link on top
 of my head but if
  you can't find it, get back to me, I'll do what I can to find it.
 
  HTH
 
  Dany
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
 Behalf Of Tom
  Deprez
  Sent: Thursday, November 23, 2000 8:39 AM
  To: [EMAIL PROTECTED]
  Subject: [Zope] DTML source
 
  Hi,
 
  Are there some sites which publish there DTML
 source(structure)? I'm
  particulary looking on how several navigation, menu, ...
 structures are
  implemented in Zope.
 
  On Zope.org you can see the DTML-source. Unfortunately not the
  implementation of the navigation (or the menu on the left).
 
  Tom.
 
  ___
  Zope maillist  -  [EMAIL PROTECTED]
  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 )


 smime.p7s