如何直接在Plone中仅发布我的Container类型的子项? [英] How to directly publish only child items of my Container type in Plone?

查看:80
本文介绍了如何直接在Plone中仅发布我的Container类型的子项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Plone中有一个自定义的文件夹式敏捷内容类型.它只能将文档作为子级.我希望这些文档在创建时直接发布.

I have a custom folderish Dexterity content-type in Plone. It can have only Documents as children. I want these documents to be directly published as they are created.

我可以通过为文档"类型设置适当的工作流程来轻松实现此目标,但这会影响网站中的每个文档.我只希望直接发布容器类型中的那些容器.

I can achieve this easily by setting an appropriate workflow for the Document type, but that would affect every document in my site. I want only the ones inside my container type to be directly published.

我想到了两个选择:

基本上只创建库存单据类型的副本,并将其工作流程设置为仅具有发布状态.

Create basically just a copy of the stock Document type and set its workflow to something that has only published state.

为Documents添加IObjectAdded事件,并检查新Document的父级是否是我的容器类型,并使用python代码手动发布.

Add IObjectAdded event for Documents and check if the parent of the new Document is my container type and do manual publishing in python code.

听起来都不太好.我还有其他选择吗?

Neither sounds too nice. Do I have other options?

推荐答案

您只需要工作流策略支持(CMFPlacefulWorkflow)"产品(这是Plone的默认部分):

You just want the "Workflow Policy Support (CMFPlacefulWorkflow)" product (it's a default part of Plone):

Add in Plone the capability to change workflow chains for types in every object.

您可以在单个文件夹或该文件夹及其下的所有文件夹上设置工作流程.

You can set workflow on individual folders, or on that folder and all folders below it.

这篇关于如何直接在Plone中仅发布我的Container类型的子项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆