Programmatische Änderung von Artikeln
- Erhalten des aktuellen Stadiums
from Products.CMFCore.utils import getToolByName wftool = getToolByName(context, 'portal_workflow' review_state = wftool.getInfoFor(context, 'review_state')
Anmerkung: Wird das Stadium im Catalog Tool (portal_catalog) abgefragt, so wird das Stadium als Metaangabe des Objekts ausgegeben:
from Products.CMFCore.utils import getToolByName catalog = getToolByName(context, 'portal_catalog') for result in catalog(portal_type = ('Document', 'News Item'), review_state =('published', 'public', 'visible',)): review_state = result.review_state # do something with the review state- Ändern des Stadiums
wftool.doActionFor(context, action='publish')