drupal 6 cck 字段:有没有一种简单的方法来复制 cck 字段?
有没有一种简单的方法可以复制具有相同属性的 cck 字段,只是为了使其具有不同的名称?
is there a easy way to duplicate cck field with the same propeties just to make it a diffrent name?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是的,有。编辑:我现在看到你说的是“cck 字段”,但我读的是“cck 类型”:/
要使用现有的“字段”:请参阅 Gokul N K 的答案。
基本上,您:
转到您的内容类型的“管理字段”,然后在现有字段下添加新标签并从下拉列表中选择要使用的字段。
要复制整个内容类型:
admin/content/types/export
并选择您要复制的内容类型代码的前几行需要更改(以更改名称)。根据需要编辑前几行,例如:
$content['type'] = 数组 (
'名字' => “新名称”,
'类型' => '新名称',
'描述' => '一种新的内容类型,具有与另一种内容类型所有相似的属性',
复制“导出数据”框中的所有内容
单击“导入”屏幕顶部的“导入”选项卡(或导航至
admin/content/types/import
)将所有内容粘贴到“导入数据”框中,确保“内容类型”为
<创建>
,然后单击“导入”Yes there is. Edit: I see now you said cck field, but I read "cck type" instead :/
To use an existing field: See Gokul N K's answer.
Basically you:
Go to "Manage Fields" for your content type and under Existing field, add a new label and choose the field you want to use from the dropdown.
To duplicate an entire content type:
admin/content/types/export
and choose the content type you wish to copyThe first few lines of the code need to be changed (to change name). Edit the first few lines as needed, for example:
$content['type'] = array (
'name' => 'NEW NAME',
'type' => 'new_name',
'description' => 'A new content type with all similar properties of another',
Copy everything from the "Export data" box
Click the "Import" tab at the top of the screen (or navigate to
admin/content/types/import
)Paste everything into the "Import data" box, make sure "Content Type" is
<Create>
, and click "Import"哎呀,看起来我错过了一些东西:(
我想你可以去内容类型管理字段(例如
admin/content/node-type/page/fields
页面),有一个名为<的选项code>现有字段。从
下拉列表中,您可以选择已创建的任何字段
,然后为其指定一个新标签,我认为这应该可行。知道您是否正在寻找其他东西。
Oops looks like I am missing something :(
I think you can go the content-type manage fields(
admin/content/node-type/page/fields
page for example), there is an option calledexisting field
.From the
drop-down you can select any of the fields that you have already created
and then just give it a new label.I think this should work. Let me know if you are looking for something else.
刚刚创建了一个执行此操作的模块 - 我需要克隆内容类型中的字段,但我找不到快速且简单的解决方案。
请查看:内容克隆字段
应该会在接下来的 12 小时内发布版本。
希望这有帮助。
Just created a module that does this - I needed to clone fields within a content type and I couldn't find a quick and easy solution.
Have a look at: Content Clone Field
A release should be available within the next 12 hours.
Hope this helps.