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

J Kinsley jkinsley@horus.bticc.net
Fri, 13 Oct 2000 06:42:54 -0400 (EDT)


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=/Files&dir=/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