Page 1 of 1

Change parent with sql tool

Posted: Mon Feb 11, 2008 6:15 pm
by baresi
I am looking at changing parents of a bunch of pages and trying not to use listcontent. I logged in to the database with a tool (heidisql) and I guess the main thing is to change parent_id, but what should be done with hierarchy, id_hierarchy and item_order (and any other fields)? Will appreciate any help :)

Re: Change parent with sql tool

Posted: Mon Feb 11, 2008 8:39 pm
by alby
baresi wrote: I am looking at changing parents of a bunch of pages and trying not to use listcontent. I logged in to the database with a tool (heidisql) and I guess the main thing is to change parent_id, but what should be done with hierarchy, id_hierarchy and item_order (and any other fields)? Will appreciate any help :)
It's not simple!!!
You must modify:
parent_id
item_order
hierarchy ("hierarchy of parent_id"."0000""item_order") [last item must be 5 numbers]
id_hierarchy ("id of parent_id"."id of content_id")
hierarchy_path ("hierarchy_path of parent_id"/"content_alias")

Alby