我一直在寻找一种在 Drupal 中处理修订的好方法,但尚未成功。由于某种原因,没有内置的方法来保存草稿(到目前为止我已经发现),并且我到目前为止尝试过的模块似乎无法完全工作。首先,我尝试了 save_as_draft
,它似乎几乎满足了我的要求,如果我没记错的话,它还可以处理 CCK 字段。遗憾的是,它似乎以某种方式被破坏了,所以一旦我将其保存为草稿,我就无法编辑页面。也许我可以通过检查代码来修复它,但这不是我的首选解决方案。我尝试的另一个模块被恰当地命名为 draft
,但据我所知,该模块仅处理标题和正文字段,并且以一种对我来说似乎很奇怪的方式执行此操作。
有一些常见的做法可以解决这个问题吗?我无法想象以前没有人必须解决这个问题,但我还没有找到任何好的解决方案。
澄清
我需要为现有内容提供此功能,也就是说,我希望能够创建和编辑已发布页面的草稿版本,而“旧”版本将
仍然可供匿名用户使用。
示例
在我的 Drupal 站点上,我有一个页面,其中包含有关某件事的当前信息,例如本周发生的事件。下周还有一个活动发生,信息将位于同一页面(节点)。我想要做的是能够创建此活动页面的新版本,对其进行更新,上传新图像等,并且在时机成熟时我希望将这个新版本设为当前版本。为了实现这一目标,当前的修订版必须始终保持发布状态,并可供匿名用户使用。同时,还会有第二个未发布的修订版,编辑者可以访问和编辑,并在需要时发布。
I've been looking for a good way to handle revisions in Drupal, but I am yet to succeed. For some reason there is no built in way to save a draft (that I've found so far), and the modules I've tried so far do not seem to fully work. First I tried save_as_draft
, which seemed to do almost what I wanted, and if I'm not mistaken, also handles CCK fields. Sadly it seems to be broken somehow, so I can't edit a page once I've saved it as a draft.. maybe I could fix it by going through the code, but that would not be my preferred solution. The other module I tried is aptly named draft
, but from what I can tell, this module only handles the title and body fields, and does this in a way that appear odd to me.
Is there some common practice to solve this? I couldn't imagine that nobody had to solve this before, but I haven't found any good solution to it yet.
Clarification
I need this functionality for already existing content, that is, I want to be able to create and edit a draft version of an already published page, while the "old" version would
still be available to anonymous users.
Example
On my Drupal site I have a page with current information about something, for example an event occuring this week. There is also an event occuring next week, and the information will be located on the same page (node). What I want to do is to be able to create a new revision of this event page, update it, upload new images etc, and when the time is right I want to make this new revision the current one. To achieve this the presently current revision will have to remain published the whole time, and available to anonymous users. At the same time there would be a second, unpublished revision that editors can access and edit, and publish when desired.
发布评论
评论(3)
仅供参考,如果您使用发布/取消发布,管理员需要管理节点才能查看未发布的节点,这对于非 root(用户 1)管理员来说通常访问权限过多,如果您的站点或任何站点的访问权限超过一个人访问后端。它并不意味着成为类似“wiki”的功能。
有一个修订模块和一个内容审核模块可能适合您的需求。
http://drupal.org/project/revisioning
http://drupal.org/project/content_moderation
FYI, if you use Publish/Unpublish, admins need Administer Nodes in order to see unpublished nodes and that is usually too much access for non-root (user 1) admins, which would be a problem if your site or any site had more than one person accessing the backend. It is not meant to be a 'wiki' like function.
There is a Revisions module and a Content Moderation module that may suit your needs.
http://drupal.org/project/revisioning
http://drupal.org/project/content_moderation
除非我错过了什么,我想 Drupal 的内置“发布”机制应该适合您的需求。
你想要草稿吗?只是在创建内容时不要“发布”。
您想让它变得“更智能”吗?使用工作流程/规则。
问候,
蜀蜀
Unless I miss something, I guess Drupal's built-in "publish" mechanism should fit to your needs.
You want a draft ? Just don't "publish" when creating the content.
You want it even "smarter" ? Use workflow/rules.
Regards,
Shushu
我不确定这是否完全满足您的要求,但我知道在工作中我的一些同事已经使用了 节点克隆模块用于与您的用例类似的东西。使用此模块,您可以克隆节点,然后编辑克隆。
我自己从未使用过这个模块,所以我不能确定,但它可能不会复制修订信息。不过,也许您可以添加一些内容!
I'm not sure if this meets your requirements exactly or not but I know that at work some of my colleagues have used the node clone module for something similar to your use case. Using this module you could clone a node and then edit the clone.
I've never used this module myself, so I can't be sure but it probably doesn't copy over the revision information. Maybe that's something that you could add in, though!