Re: [Zope] folders with same names (newbie question)
--- In zope@y..., Florent Guillaume <fg@n...> wrote:
Marie Robichon <robichon@e...> wrote:
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...
Error Type: KeyError Error Value: Parameters
If the intent of the 'javascript' method is to get Parameters from the toplevel Machine directory, then you have to be sure that the dtml-with acquires the correct one. As you saw acquisition can get a bit in the way, especially when using HTML.
No the Javascript method contains javascript for drop-down menus. I use a dtml-with to get the absolute url from the top level Machine folder, then from the subfolders (of which Parameters is one). These dtml-withs are then correctly closed. However the absolute url that the initial tree widget generated was mysite/About/GuidedTour/Machine, but this fails, since somehow Zope get its knickers in a twist (if you see what I mean ;-))
Can you not simply rename the toplevel Machine to something else ? Or else try a hack like <dtml-with "About.aq_parent.Machine"> (untested) but I'd really rename the whole thing.
I don't think remaning the folders should be the solution, since I'm sure that under another section (Beamlines for example) our editors will want to put a ' handbook' folder under beamline1, beamine2 etc. Is there any way to 'fix' the namespace of the tree widget? See below <dtml-tree treeobject branches="tpValues" sort="treesort"> <dtml-if "_.getitem(thisdocument,1)!=_.getitem(id,1)"> <dtml-if tree-item-expanded> <dtml-var darrowo> <dtml-else> <dtml-var rarrowo> </dtml-if> <span class="treemnulnk"><a href="<dtml-var expr="absolute_url(relative=0)">" style="text-decoration:none"><dtml-var name="title_or_id"></a></span> <dtml-else> <dtml-var rarrowb> <span class="treemnulnk"><strong><dtml-var name="title_or_id"> </strong></span> </dtml-if> </dtml-tree> TIA Marie Robichon Web Task Force European Synchrotron Radiation Facility BP 220 38043 Grenoble Cedex France http://www.esrf.fr Tel: (33) 04 76 88 21 86 Fax: (33) 04 76 88 24 27
participants (1)
-
Marie Robichon