Forum: Radiant CMS copy pages

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Todd McGrath (Guest)
on 2007-02-26 22:02
(Received via mailing list)

Does anyone have a recommendation for copying existing pages from one
parent to

I'm doing it against the database directly (sql, export, import), but
I'm hoping
for a more efficient way.

Sean C. (Guest)
on 2007-02-26 22:04
(Received via mailing list)

Do you want to copy them or just move them?  Moving them is fairly
trivial with script/console.

Todd McGrath (Guest)
on 2007-02-26 22:09
(Received via mailing list)
Hi Sean,

I need to copy em

BTW- is down?


Quoting Sean C. <removed_email_address@domain.invalid>:
David Minor (Guest)
on 2007-02-26 22:27
(Received via mailing list)
On Feb 26, 2007, at 2:08 PM, Todd McGrath wrote:

> BTW- is down?

yes, it's not just you.
Sean C. (Guest)
on 2007-02-26 22:35
(Received via mailing list)

Yes, I asked John about it, and TextDrive is having issues with the
server. (

There's not a trivial way to do a deep-copy of a page, but I'll outline
the process for you.

1) Open script/console production (assuming you're running in production
mode-- I hope)
2) Use Page.find to get the original page that you intend to copy.
3) Clone the original page (original.clone).
4) Assign the parent or parent_id of the cloned page.
5) Iterate through all the page parts of the original page, clone them,
and add them as parts to the cloned page.
6) Save everything.

John W. Long (Guest)
on 2007-02-27 18:48
(Received via mailing list)
Todd McGrath wrote:
> BTW- is down?

It's back up now.

John L.
This topic is locked and can not be replied to.