[Zope] folders with same names (newbie question)

Marie Robichon robichon@esrf.fr
Tue, 14 May 2002 16:54:05 +0200


At 09:25 14/05/02 -0400, you wrote:
>What type of object is index_html and what is the code for it?

its a dtml-method that ' glues' a whole lot of other methods together 
(which are mainly just presentation methods, but for the javascript):

<dtml-var header>
<dtml-if expr="contents_html.hasProperty('special-header')">
<dtml-var special_header>
<dtml-else>
<dtml-var javascript>
</dtml-if>
<dtml-var banner>
<dtml-if expr="contents_html.hasProperty('left-menu')">
<dtml-var leftmenu>
<dtml-else>
<br>
<dtml-var new_treemenu missing="">
</dtml-if>
<dtml-if expr="contents_html.hasProperty('frenchlink')">
<dtml-if expr="LanguageDetector()=='fr'">
<dtml-var french-link>
</dtml-if>
</dtml-if>
<dtml-if expr="contents_html.hasProperty('esrf-address')">
<dtml-var esrf-address>
</dtml-if>
<dtml-var navbarbottom>
<dtml-unless expr="contents_html.hasProperty('no-breadcrumbs')">
<dtml-var breadcrumbs>
</dtml-unless>
<dtml-var btwn_crumbs_and_contents>
<dtml-var contents_html>
<dtml-var posts missing="">
<dtml-var footer>

Within the DTML-mtehod ' javascript' there is a <dtml-with Machine> 
statement that may be causing the problem but there is also the closing 
/dtml-with tag so I can't see why that should cause problems...

If you need any more info (the code in any of the methods), just ask

Thanks

Marie



>-Casey
>
>On Tuesday 14 May 2002 05:23 am, Marie Robichon allegedly wrote:
> > First of all, thanks for your patience for reading this long post.......I
> > posted it twice a while ago but had no replies so am trying again......
> >
> > Our development site has approx the following structure:
> >
> > index_html
> > - About
> >     |
> >     Guided Tour
> >     |
> >     Machine
> > - Jobs
> > - Beamlines
> > - Machine
> >     |
> >     Parameters
> > etc
> >
> >
> > Inside each folder is a contents_html document. The index_html is at
> > the root and displays this content under a generic banner with drop
> > down menus (Javascript) with links to the top level folders and their
> > subfolders.
> >
> > Local navigation is generated via a treemenu which
> > generates absolute_urls.
> >
> > However we get the following error when clicking a link in the 
> treemenu, to
> > http://mysite/About/GuidedTour
> >
> > Error Type: KeyError
> > Error Value: Parameters
> >
> > Traceback (innermost last):
> > File /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py,
> > line 150, in publish_module
> > File /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py,
> > line 114, in publish
> > File /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/Zope/__init__.py, line
> > 158, in
> > zpublisher_exception_hook
> > (Object: GuidedTour)
> > File /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py,
> > line 98, in publish
> > File /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/mapply.py,
> > line 88, in mapply
> > (Object: index_html)
> > File /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py,
> > line 39, in call_object
> > (Object: index_html)
> > File /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/OFS/DTMLMethod.py, line
> > 127, in __call__
> > (Object: index_html)
> > File
> > 
> /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_String.py,
> > line 473, in __call__
> > (Object: index_html)
> > File /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/OFS/DTMLMethod.py, line
> > 120, in __call__
> > (Object: javascript)
> > File
> > 
> /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_String.py,
> > line 473, in __call__
> > (Object: javascript)
> > File
> > /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_With.py,
> > line 76, in render
> > (Object: Machine)
> > File
> > /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_With.py,
> > line 60, in render
> > (Object: Parameters)
> > KeyError: (see above)
> >
> > I presume that Zope moves up to the root to pick up the index_html then
> > moves back down until it finds the first "Machine" folder, which is not 
> the
> > one we want then raises an error.
> >
> > Does this mean that in Zope no two folders can have the same id? This 
> would
> > cause problems when our contributors edit their parts of our site. Is 
> there
> > a way around this other than naming the folders differently?  I remember
> > seeing something about tpId somewhere....
> >
> > TIA
> >
> > Marie Robichon
> > Web Task Force
> > European Synchrotron Radiation Facility
> > Grenoble
> > France
> >
> >