public function executeCreate() { $this->forward404Unless($this->getRequest()->getMethod() == sfRequest::POST); $this->checkEditorCredential(); $culture = $this->getCulture(); $page = new sfSimpleCMSPage(); if ($this->positionType == 'under') { $page->insertAsFirstChildOf($this->relative_page); } else { $page->insertAsNextSiblingOf($this->relative_page); } $page->setSlug($this->getRequestParameter('create_slug')); $page->setTemplate($this->getRequestParameter('template')); $page->save(); $this->redirect(sfSimpleCMSTools::urlForPage($page->getSlug(), 'edit=true', $culture)); }