开发者

drupal 6 cck field: is there a easy way to duplicate cck field?

is there a easy way to duplicate cck field with the same propeties just to make it a diffrent nam开发者_运维百科e?


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:

  1. Enable the "Content Copy" module of CCK
  2. Navigate to admin/content/types/export and choose the content type you wish to copy
  3. Click "Export"
  4. Choose all the fields you want to include in the export
  5. Click "Export"
  6. You will see a bunch of code output to screen in the "Export Data" box
  7. The 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',

  8. Copy everything from the "Export data" box

  9. Click the "Import" tab at the top of the screen (or navigate to admin/content/types/import)

  10. Paste everything into the "Import data" box, make sure "Content Type" is <Create>, and click "Import"


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 called existing 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜