문제

How can I programmatically change the state of all objects in a folder to 'published'? All are default objects of Plone 4 as Link, Page, Document, and so.

도움이 되었습니까?

해결책

Cycle all objects in that folder and publish them:

wftool = getToolByName(folder, 'portal_workflow')
for child in folder.objectValues():
    wftool.doActionFor(child, 'publish')
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top