1

I'm trying to "clone" all nodes of a certain taxonomy term and assign them a new taxonomy term so they can function as sections of my site.

I'm making a site where i should put all of the information of a group of careers, something like: Contact, procedures, mission, syllabus, etc. (each on a page).

The thing is: the site should host like 16 different campuses, and about 150 careers. I'm using campus as a taxonomy term so i can group all careers of a campus, and i'm using another term to group every page of a certain career.

I don't want to create EVERY page of all of the careers, and i'm thinking there should be a way to duplicate a blank set of pages of a career and do a "batch duplicate".

I would appreciate any information that can point me in the right direction.

Thanks in advance.

0

You can create a custom module and process all of your cloning via PHP code. This tutorial describes how to create a node programmatically by creating a new node object, $node = new stdClass(); then assigning the various fields to it and then node_save($node);

So you can loop through your existing nodes that satisfy your condition, assign the existing node's fields to the new node, add any other custom fields you need, then save it, and when the loop is done you should have a new set of nodes.

0

I'm not sure I'm understanding this well, but perhaps you could create a new Content Type that holds all the career information that's common to all campuses. Then create a Content Type for each campus that has an Entity Reference field with unlimited cardinality (meaning that it allows you to have references to an unlimited number of careers). You can then create Views of campuses OR of careers with a relationship to the other Content Type, which will allow you to display the other Content Type fields in your table or list of nodes.

  • The information for a given career is not presented in a single view, each part is contained in a different node. so i have about 20 nodes for a single career. Since the site is intended to hold about 150 careers, that makes 3000 nodes. What i try to do is to avoid creating 3000 nodes by hand, by creating the first 20 and then duplicate them 150 times. – Chimekin Oct 23 '15 at 0:27
  • Why do you have 20 different nodes for a single career? What's different among these 20 nodes? Just the taxonomy term to campus? If so, my solution will help you avoid creating a different node of the same career for each campus. – argiepiano Oct 23 '15 at 0:49
  • Each career works as a microsite and all of its nodes holds a different piece of information and is shown like a section of this "microsite". The information IS different in some cases for the same career, because campuses work differently – Chimekin Oct 23 '15 at 1:42
  • Now, if you need to duplicate nodes, perhaps you can explore REplicate UI and its integration with Rules to set the taxonomy term. I haven't used this module, but the tutorial and description look interesting (see video demo youtube.com/watch?v=lr4vQWTkVJk) – argiepiano Oct 23 '15 at 1:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.