[Zope] The logic of the _ variable (Q1959)

picasso@videotron.ca picasso@videotron.ca
Thu, 16 Sep 1999 11:58:13 -0400


Hi,

I'm trying to have a deeper understanding of the use of the _ variable, so
I tried the following tests:

In a folder Collection, I have two DTML Methods: 'test' and 'index_html'.

test code                      result
<dtml-var index_html>          The index_html is diplayed
<dtml-var "_['index_html']">   Same as previous line
<dtml-var "index_html">        The code index_html is diplayed
<dtml-var "PARENTS">           [[<Folder instanc...., ...]
<dtml-var PARENTS>             Same as previous test
<dtml-var "_['PARENTS']">      Same as previous test
<dtml-var PARENTS[0]>          Key Error (as expected)
<dtml-var "PARENTS[0]">        <Folder instance at 00B30CE0>
<dtml-var "_['PARENTS'][0]">   Same as previous line

<dtml-var "_['PARENTS'][0].index_html">
                               The code index_html is diplayed
<dtml-var "PARENTS[0].index_html">
                                Same as previous test

I would like to if there is a way to display the index_html Method (not the
code) without the 'with' tag.

Second question: is ther a way to access a Zope Site without worrying about
the case in the URL ie: 
mysite/Welcome would be as mysite/WELCOME, mysite/wElCoMe and so on... and
think it is important for end user comfort.

Thank for your help. 



***************************
Oscar Picasso
picasso@videotron.ca
***************************