[Zope] adding Link objects to Plone folders programmatically

Lee J. McAllister ljmcallister at hotmail.com
Tue Aug 19 02:21:51 EDT 2003


Hi folks, I'm fairly new to Zope and Python so this is probably a completely 
obvious one for most of you but I'd really appreciate any help you can give 
me on how to do this.  I'm trying to add CMF Link instances to Plone folders 
using a script.  The intention is to provide crosslinking of articles at 
several places through out the site to be determined at their creation time.

Attempts to call the addLink method directly without importing the Link 
Class produces complaints about attempting to use an undefined global so I 
attempted to import the Link class using

    from Products.CMFDefault import Link

but it produces an error of

    Error Type : ImportError
    Error Value : import of "Link" from "Products.CMFDefault" is 
unauthorized. You are not allowed to access Link in this context


Does the Link class need to be imported to create a Link instance in a 
Python script?  Is addLink even the appropriate method to be calling to do 
this or am I barking up the wrong tree here?  Am I just a lost Java 
programmer falling on his face making the jump to the Python wagon?


Any suggestions or how-to referances you can provide me would be greatly 
appreciated.

Thanks
Lee McAllister

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the Zope mailing list