Can you use create_pages to create a Hierarchy?

Hi


I want to create a hiearchy for our pilot. The format for he create_pages script seems like it can only create on one level. Is there any way to use a single script to create a new page and then have pages underneath it for 3 or 4 levels? Eg:



home

xx-About me

xxxx- cars I own

xxxxxx- my first car

xxxxxxxx- XK Falcon

xxxxxx- my second car

xxxxxxxx- ZL Fairlane

xxxxxx- my third car

xx- About my work



Can you just create the home page and then for the rest populate the parent_assetid with an unused number eg start at 1000 and basically create your own structure that way?



Bradley

No, you can't (well, not with that script). Parent asset ID needs to be known at each level. In your example. the parent asset id are very specific:


Home (needs the parent asset ID of the Site asset)

xx - About Me (needs the parent asset ID of the Home asset)

xxxx - My First Car (needs the parent asset ID of the About Me asset)

xxxxxx - XK Falcon (needs the parent asset ID of the My First Car asset)



… and so on. :slight_smile:



When I'm creating hierachies using the script, I use an Excel muti-tab spreadsheet, with each level on a tab. Then, once I've created each level with the script, I cut'n'paste the new asset IDs into the next level down.