scripting - Retrieve contents of objects from Plone using Python script -
i using plone 5. have added python script , trying objects contained in 1 of folders , print them. used context.restrictedtraverse(path)
object path returns <document @ path>
. have suggestions? thanks!
you traversing document.
here list of possible methods children of folder.
>>> # list children without security checks >>> context.restrictedtraverse(path).objectvalues() >>> # list ids without security checks >>> context.restrictedtraverse(path).objectids() >>> # list ids/values without security checks >>> context.restrictedtraverse(path).contentitems() >>> # can use catalog, includes security checks , more. >>> # return catalog results (brains), not actual object. >>> context.restrictedtraverse(path).objectids().getfoldercontents()
for further informations please check plone docu page: http://docs.plone.org/develop/plone/content/listing.html
Comments
Post a Comment