[Zope] How to refer an object in a sub folder?

Dieter Maurer dieter@handshake.de
Tue, 2 Apr 2002 22:06:04 +0200


Sven Rudolph writes:
 > > How do I refer to 'index' in the folder 'java' from an object in 'tech'?
 > > 
 > > <dtml-var java/index> ???
 > Try this:
 > <dtml-var "java.index">
Almost surely, it will not work (as wanted):

  "index" is probably a DTML object. DTML objects usually need
  to be rendered to be useful as "dtml-var" arguments, something
  like:

	<dtml-var expr="_.render(java.index)">

 > If you rename your file to "index_html" you can even do this:
 > <dtml-var java>
Apparently a wide spread misconception!

	"index_html" is only appended by ZPublisher, e.g.
	during URL traversal. "dtml-var" rendering does not do that!

Please read

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>

for a detailed description.



Dieter