Add page manually

Permalink
Hi,

After some searching, I cannot find a way to create a page manually. I would like to know what the SQL command would be, or better yet, is there a built in API command?

Thanks.

 
Mainio replied on at Permalink Reply
Mainio
Under a specified page
$parent = Page::getByID(123);
$ct = CollectionType::getByHandle('right_sidebar');
$newPage = $parent->add($ct, array(
  'name' => 'New Page',
  'cDescription' => 'Short description'
));


Under top-level: just as the parent page ID use constant HOME_CID.