By chx on
How could I duplicate a node? I'd like to create another, very similar but not exact copy of the node and present both.
How could I duplicate a node? I'd like to create another, very similar but not exact copy of the node and present both.
Comments
For the archives
http://drupal.org/node/16806
--
My developer blog. | The news is Now Public | Ask not what Drupal can do for you -- ask what you can do for Drupal.
--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.
is it usable with 4.6/4.7?
The edit as new module is only tagged for Drupal 4.5- do you know if it works with more recent versions of Drupal, or if there is anyone updating it?
---
Work: BioRAFT
quick edit... sorry not a patch or anything
I'm going to try to post this in here.... sorry it's not a patch. Just needed the same functionality so I searched and found this post. I did a quick edit on it to make it work in 4.7. I don't know what it did in previous versions but it will correctly duplicate the type of node now and put the parent as the previous node. However the content nor the title is kept. Hope it helps someone though! I may look later to see if I can get the rest going, i.e. passing the title and the body content.
Changed around line 35:
to:
And around line 80, changed:
to:
This is working as mentioned above on 4.7.2.
--------------------
Michael
http://michaelangela.name
Thanks- I'll take a look.
Thanks- I'll take a look. For comparison I made an alterrnate module based on code from the forum:
http://drupal.org/project/node_clone
---
Work: BioRAFT
Oh going to have to give
Oh going to have to give this one a spin! :)
--------------------
Michael
http://michaelangela.name