[Zope] DTML Acquisition NameSpace Help Needed.....

2000-10-13 Thread J Kinsley

I am building a framed site using Zope and I am trying to get
functionality that after hours of reading documentation I am
beginning to think is not possible, but since what I have read is so
obscure I have decided to post a message before giving up.

The code examples below *DO NOT* work, but are being used in an
attempt to illustrate what I am attempting to do as I thought it
would work.  After reading documentation for the last several hours I
am now more confused then when I started.

Given the following URL's:

http://./Files/?dir=/foo/bar/file=baz.html
http://./?section=/Filesdir=/foo/bar/file=baz.html

And the Following 


/index_html - DTML Method

dtml-var FrameSet



/FrameSet - DTML Method

XXX - How can I negate this?  IE. dtml-if "not section"
dtml-if section 
dtml-else
dtml-call "REQUEST.set('section', '/ViewFrame')"
/dtml-if section

XXX - I do not think calling REQUEST.set() is the best way to
accomplish this.  What is a better way?
dtml-call "REQUEST.set('topframe', '1')"

frameset rows="60,75,*"
 frame name="title_frame" src="dtml-absolute_url;/TitleFrame"
 frame name="banner_frame" src="dtml-absolute_url;/BannerFrame"
 frame name="view_frame" src="dtml-absolute_url;dtml-section;"
/frameset




/ViewFrame - DTML Method

frameset rows="60,75,*"
 frame name="menu_frame" src="dtml-absolute_url;/MenuFrame"
 frame name="main_frame" src="dtml-absolute_url;/MainFrame"
/frameset




XXX - I can not get this to work at all.  Topframe should be set or
true if the visitor arrived in the /Files Folder from the top level
frameset and /Files/ViewFrame will be loaded into the view_frame
target.  If the visitor came directly to /Files and topframe is unset
or false, then I want to redirect them back to the toplevel /FrameSet
to load the top frames then display the /Files/ViewFrame in the
view_frame target and pass along dir and file from the URL query
string.

/Files/Index - DTML Method

dtml-if topframe
dtml-var ViewFrame
dtml-else
dtml-var "FrameSet(section=/Files)"
/dtml-if topframe




XXX - If this method is called from the top level FrameSet method,
how to I access dir and file from the original request?

/Files/ViewFrame - DTML Method

frameset rows="60,75,*"
 frame name="menu_frame" src="dtml-absolute_url;/MenuFrame?dir=dtml-dir;"
 frame name="main_frame" 
src="dtml-absolute_url;/MainFrame?dir=dtml-dir;file=dtml-file;"
 frame name="navbar_frame" src="dtml-absolute_url;/NavBarFrame?dir=dtml-dir;"
/frameset



Over the last few days I have tried all sorts of things to make this
work, but all attempts have failed.  I am sure there is a very simple
solution that one of you Zope Gurus could quickly explain.  If you
are going to respond with RTFM, the please cite specific references
in the manual. ;-)

Thanks in advance.

Regards,
Jarrod Kinsley




___
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 Acquisition NameSpace Help Needed.....

2000-10-13 Thread Dieter Maurer

J Kinsley writes:
  /FrameSet - DTML Method
  .
  XXX - How can I negate this?  IE. dtml-if "not section"
dtml-unless section
  dtml-if section 
  dtml-else
  dtml-call "REQUEST.set('section', '/ViewFrame')"
  /dtml-if section
  
  XXX - I do not think calling REQUEST.set() is the best way to
  accomplish this.  What is a better way?
It is ineffective, as you do not use "topframe" later (in *this*
request).
  dtml-call "REQUEST.set('topframe', '1')"
  
  frameset rows="60,75,*"
   frame name="title_frame" src="dtml-absolute_url;/TitleFrame"
   frame name="banner_frame" src="dtml-absolute_url;/BannerFrame"
   frame name="view_frame" src="dtml-absolute_url;dtml-section;"
  /frameset
  .

  XXX - I can not get this to work at all.  Topframe should be set or
  true if the visitor arrived in the /Files Folder from the top level
  frameset and /Files/ViewFrame will be loaded into the view_frame
  target.
The frameset and its frames parts are fetched in *different* requests.
The "REQUEST.set" only affects the REQUEST object for the
frameset. The REQUEST objects for the frame components are
not affected.

You have two options:

 * a session product (there are some around on zope.org)
   it allows you to save information across web requests

 * passing the additional information through a query string
   key=value pair (do not forget to "url_quote_plus")

  XXX - If this method is called from the top level FrameSet method,
  how to I access dir and file from the original request?
see above.



Dieter

___
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 )