i've created a content type def with CCK and now need to duplicate that content type 10 more times. is there a way to 'copy/paste' a content type rather than having to go through the CCK process?

Comments

nevets’s picture

If all the content types are the same and you need to categorize things why not use taxonomy to do that?

Question aside, you can export the initial content type and edit the first part of the export and import the information. The beginning of the export will look something like

$content[type] = array (
'name' => 'Your content name',
'type' =>'yourcontentname',
'description' => 'Your content discription',
'title_label' => '',
...

You will want to edit the name, type and description before importing.

esmccune’s picture

thanks for the reply, i'll give it try here shortly.

to answer your question, we have a number of depts that will be contributing content, using the same content type design (with the name, type, description changed). the contributors will not have permission to edit other depts' content. roles will be established to further manage permissions, as well as where content will be able to be rendered.

nevets’s picture

Using og you could set up one group per department and if people "belong" to departments/groups they would only be able to edit content in group(s) they belong to. That way you would only need one content type. There is also a module to something similiar used taxonomy.

ambrojio’s picture

OG uses content types to designate different groups, and then it associates the group to nodes of that content type. Which is essentially the same thing as creating custom content types for each role, just with an added layer of complexity. The goal behind OG is to allow users more flexibility in creating groups in a community driven environment. But if all you need to do is have roles control certain content types, OG is superfluous.

nevets’s picture

If the content type is really the same but you want to limit who can see which content type I think using organic groups is a better choice than duplicating the content type simply so you can limit who can see which content type. Besides being more flexiable (it would be easier to add another content type also limited by groups) it scales better in my opion.

lmshawl’s picture

I'm building a site where I'm thinking about copying content types in this same way - to control who can edit certain sections based on content type. It is a public, mostly static site. Management is not about who can see the pages (everyone can). I only need to control who can edit the pages in each section.

Taxonomy would have worked great, except that editors should not have access to determine the taxonomy of pages, and I don't seem to be able to control that.

I heard that Organic Groups might offer a solution, but I couldn't figure out how to configure it for my needed functionality.

Creating redundant content types seems cumbersome, but it is also simple.

Any suggestions? I'm not really sure if this is the appropriate place to ask.

Shane Birley’s picture