[Zope-CMF] using NGFNavigator with CMF

Maarten Slaets Maarten Slaets <maarten.slaets@neolabs.be>
Wed, 25 Apr 2001 13:33:50 GMT


Hi,
I'm having problems using NFGNavigator 

http://www.zope.org/Members/gyst/NFGnav

insite a CMF site. In the custom skins directory I've put the following DTML
document, to display the Tree Menu.

----------
<dtml-var "NAVCore.TreeMenu(
	PARENTS,
	REQUEST,
	id(),
	initlevel=1,
	Meta_Types=['Folder','DTML Document','DTML Method','Image','CMF
Site','Document','Portal Folder']
)">
-----------

In the CMF site I've got an 'about' portal folder, and a Document inside tat
(index_html).
when going to that index_html, the tree changes accordingly, BUT when I click
on 'view' or 'edit' I get the following error, which doesn't make any sense
to me when I look at NFG's code:

------------

  Zope Error

  Zope has encountered an error while publishing this resource. 

  TypeError

  Sorry, a Zope error occurred.

  Traceback (innermost last):
    File /home/zope/Zope-2.3.1/lib/python/ZPublisher/Publish.py, line 223, in
publish_module
    File /home/zope/Zope-2.3.1/lib/python/ZPublisher/Publish.py, line 187, in
publish
    File /home/zope/Zope-2.3.1/lib/python/Zope/__init__.py, line 221, in
zpublisher_exception_hook
      (Object: DynamicType)
    File /home/zope/Zope-2.3.1/lib/python/ZPublisher/Publish.py, line 171, in
publish
    File /home/zope/Zope-2.3.1/lib/python/ZPublisher/mapply.py, line 160, in
mapply
      (Object: document_view)
    File /home/zope/Zope-2.3.1/lib/python/ZPublisher/Publish.py, line 112, in
call_object
      (Object: document_view)
    File /home/zope/Zope-2.3.1/Products/CMFCore/FSDTMLMethod.py, line 218, in
__call__
      (Object: document_view)
    File /home/zope/Zope-2.3.1/lib/python/DocumentTemplate/DT_String.py, line
538, in __call__
      (Object: document_view)
    File /home/zope/Zope-2.3.1/Products/CMFCore/FSDTMLMethod.py, line 213, in
__call__
      (Object: standard_html_header)
    File /home/zope/Zope-2.3.1/lib/python/DocumentTemplate/DT_String.py, line
538, in __call__
      (Object: standard_html_header)
    File /home/zope/Zope-2.3.1/lib/python/OFS/DTMLDocument.py, line 182, in
__call__
      (Object: example_TreeMenu)
    File /home/zope/Zope-2.3.1/lib/python/DocumentTemplate/DT_String.py, line
538, in __call__
      (Object: example_TreeMenu)
    File /home/zope/Zope-2.3.1/lib/python/DocumentTemplate/DT_Util.py, line
334, in eval
      (Object: NAVCore.TreeMenu(
	  PARENTS,
	  REQUEST,
	  id(),
	  initlevel=1,
	  Meta_Types=['Folder','DTML Document','DTML Method','Image','CMF
Site','Document','Portal Folder']
  ))
      (Info: REQUEST)
    File <string>, line 0, in ?
    File /home/zope/Zope-2.3.1/Products/NFGnav/NFGnav.py, line 134, in
TreeMenu
      (Object: NAVCore)
    File /home/zope/Zope-2.3.1/Products/NFGnav/NFGnav.py, line 261, in
ChartLevel
      (Object: NAVCore)
    File /home/zope/Zope-2.3.1/Products/NFGnav/NFGnav.py, line 261, in
ChartLevel
      (Object: NAVCore)
    File /home/zope/Zope-2.3.1/Products/NFGnav/NFGnav.py, line 261, in
ChartLevel
      (Object: NAVCore)
    File /home/zope/Zope-2.3.1/Products/NFGnav/NFGnav.py, line 261, in
ChartLevel
      (Object: NAVCore)
    File /home/zope/Zope-2.3.1/Products/NFGnav/NFGnav.py, line 214, in
ChartLevel
      (Object: NAVCore)
  TypeError: too many arguments; expected 1, got 2




  Troubleshooting Suggestions

	The URL may be incorrect. 
	The parameters passed to this resource may be incorrect. 
	A resource that this resource relies on may be encountering an error.


  For more detailed information about the error, please refer to the HTML
source for this page. 

  If the error persists please contact the site maintainer. Thank you for
your patience. 

------------

Does anybody know why it complains about the number of arguments? I did some
testing and it only returns an error when I include 'Document' in the meta
types for NAVCore.TreeMenu()

Thanks
Maarten
NEOlabs - http://www.neolabs.be - mailto:info@neolabs.be