Hi,
I'm adding a new page using a form on the front page (similar to the tutorial for adding a poll result). I got it working to just add the page. What I'd like to do now is add the page below an existing page. Can anybody suggest how I do this.
Here is the current code that just adds the new page at the top of the hierarchy:
function addMyItem($data, $form) {
$my_item = new MyItem();
$form->saveInto($my_item);
$my_item->write();
Director::redirectBack();
}
Thanks,
Bruce