[drupal-devel] Changing node type
I'd several post of type page, but now, I need to switch them to type book in order to make them sorteable by weigth and not only by posting date. It's safe to change the node type in the database from page to book ? In case it don't, could you suggest please a manner to achieve switching node type. Regards maykel -- ,''`. Debian GNU/Linux : :' : The universal & free Operating System `. `' El Sistema Operativo universal y libre `- http://www.debian.org/
I'd several post of type page, but now, I need to switch them to type book in order to make them sorteable by weigth and not only by posting date.
It's safe to change the node type in the database from page to book ? In case it don't, could you suggest please a manner to achieve switching node type.
Look what else is added into the book table for a book, and also create this data for your new book nodes. Otherwise it will be OK AFAIK. Goba
Maykel Moya wrote:
I'd several post of type page, but now, I need to switch them to type book in order to make them sorteable by weigth and not only by posting date.
It's safe to change the node type in the database from page to book ? In case it don't, could you suggest please a manner to achieve switching node type.
We used to have a contrib module that could accomplish this [1]. (without the need to directly edit the db) Perhaps we should update and revive it. In the meantime, you'll need to add entries to your "book" table with a nid matching that of the node you are converting to the book type. You can set parent and weight to 0 (and leave "log" empty) then modify them from within Drupal if you'd like. [1] http://cvs.drupal.org/viewcvs/drupal/contributions/modules/convert/?hideatti...
On Mon, 28 Mar 2005 05:28:31 -0600, Tom Dobes <tomdobes@purdue.edu> wrote:
Maykel Moya wrote:
It's safe to change the node type in the database from page to book ? In case it don't, could you suggest please a manner to achieve switching node type.
We used to have a contrib module that could accomplish this [1]. (without the need to directly edit the db) Perhaps we should update and revive it.
[1] http://cvs.drupal.org/viewcvs/drupal/contributions/modules/convert/?hideatti...
Tom, This would be very useful. We sort of pushed ahead on Spread Firefox without thinking about node types and now I have a bunch of meeting notes stored as blog posts which really should be book pages. And simple way to make this change would be very helpful. Chris
On Mar 28, 2005 9:37 PM, Chris Messina <chris.messina@gmail.com> wrote:
On Mon, 28 Mar 2005 05:28:31 -0600, Tom Dobes <tomdobes@purdue.edu> wrote:
Maykel Moya wrote:
It's safe to change the node type in the database from page to book ? In case it don't, could you suggest please a manner to achieve switching node type.
This would be very useful. We sort of pushed ahead on Spread Firefox without thinking about node types and now I have a bunch of meeting notes stored as blog posts which really should be book pages. And simple way to make this change would be very helpful.
In specific case of converting a post to a book page... do you really need to do that? You can add a page or blog post to a book using node's "outline" tab. It remains of original node type, visible in content admin, search, tracker etc., but looks as part of a book. Converting would be nice to have, but you can only convert between the simple node types like page and story... Most others have additional information, which has to be filled in or is lost upon conversion. Imagine converting an image to an event ;) menesis
menesis wrote:
Converting would be nice to have, but you can only convert between the simple node types like page and story... Most others have additional information, which has to be filled in or is lost upon conversion. Imagine converting an image to an event ;)
I think that's why the module was not updated after it was released... it had some significant limitations. However, it might be worthwhile to revive for use in mass conversions... another item for my "to-do" list, I guess. Tom
Converting would be nice to have, but you can only convert between the simple node types like page and story... Most others have additional information, which has to be filled in or is lost upon conversion. Imagine converting an image to an event ;)
I think that's why the module was not updated after it was released... it had some significant limitations. However, it might be worthwhile to revive for use in mass conversions... another item for my "to-do" list, I guess.
What most of those wishing this feature miss is the conversion of a comment and all its replies to a forum/story, etc. node. That is a simple text container to another simple text container, but cropping out part of a comment tree, and making the first comment a node. This does not involve complex node types, since the starting point is a text container and the resulting node is also a simple one. Goba
Tom Dobes wrote:
We used to have a contrib module that could accomplish this [1]. (without the need to directly edit the db) Perhaps we should update and revive it. http://cvs.drupal.org/viewcvs/drupal/contributions/modules/convert/?hideatti...
That would be excellent, I've also found occaison where I thought a forum comment was sufficiently different to be converted to an entirely new topic, but had no way to do it, I guess that functionality could be added lately. Simon
We used to have a contrib module that could accomplish this [1]. (without the need to directly edit the db) Perhaps we should update and revive it. http://cvs.drupal.org/viewcvs/drupal/contributions/modules/convert/?hideatti...
That would be excellent, I've also found occaison where I thought a forum comment was sufficiently different to be converted to an entirely new topic, but had no way to do it, I guess that functionality could be added lately.
This is a very much desired feature, yes, it is definitely badly needed. Goba
participants (6)
-
Chris Messina -
Gabor Hojtsy -
Maykel Moya -
menesis -
Simon Lindsay -
Tom Dobes