Re: [Zope] Newbie question, help with navigation method

2000-12-06 Thread Dieter Maurer

Richard Blumberg writes:
   Navigation works when called directly,
  does not work when included in "index_html" 
  
  Navigation:
  dtml-in objectValues
 

  Is this a bug in Zope, or am I doing something wrong?
Not directly.

Almost surely, your "index_html" is a DTML document.
A DTML document defines the method "objectValues" and it
returns the empty list.
One *might* think of this as a bug or a feature.
(I tend to think of it as a bug).

In a DTML document (unlike a DTML method), the object
is pushed on top of the namespace stack.
Therefore, the "objectValues" in your navigation object
is the "objectValues" of the "index_html" and it returns
"[]".

If you would make your "index_html" a DTML method,
then "objectValues" would be the method of the
object for which the method is called for. This
means your folder. And it would work.



Dieter

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Newbie question, help with navigation method

2000-12-05 Thread Richard Blumberg

I've a Zope newbie, trying to set up a Zope site at zope.org, and I'm 
running into problems with what seems like it should be a fairly 
simple navigation method.

I've replaced the standard_html_header and footer methods with my 
own, which create a simple two column table; I'm trying to get the 
navigation information into the left column. I've established a 
nav_title property on the two pages that I want to show up in the 
navigation list, with the values "Home" and "Biography", and I've 
written a nav_vertical method to display the list:

dtml-in objectValues
dtml-if nav_title
a href="dtml-absolute_url;"dtml-var nav_title/abr
/dtml-if
/dtml-in

I've embedded a call to that method in the standard_html_header method:

html
head
titledtml-var title_or_id/title
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/head
body bgcolor="#FF"
table width="90%" border="0" cellpadding="8"
   tr
 td align="center"img 
src="http://www.zope.org/Members/rblumberg/images/rbRight" width="50" 
height="60"/td
 td valign="bottom"
   h2dtml-var title/h2
 /td
   /tr
   tr
 td valign="top"hr
dtml-var nav_vertical
hr/td
 td

(The table cells are closed in the standard_html_footer.)

Now, the nav_vertical method works exactly as planned when I call it directly:

http://www.zope.org/Members/rblumberg/nav_vertical

The header method also displays correctly (even without the closing 
tags, at least in MSIE 5) when it is called directly:

http://www.zope.org/Members/rblumberg/standard_html_header

But the pages which call the new header don't display the navigation list:

http://www.zope.org/Members/rblumberg/index_html

Is this a bug in Zope, or am I doing something wrong?

Richard

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )