Created
October 6, 2009 05:38
-
-
Save ajshort/202791 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -41,10 +41,20 @@ class ContentController extends Controller { | |
| $this->dataRecord = $dataRecord; | |
| $this->failover = $this->dataRecord; | |
| parent::__construct(); | |
| } | |
| + /** | |
| + * Return the link to this controller, but force the expanded link to be returned so that form methods and | |
| + * similar will function properly. | |
| + * | |
| + * @return string | |
| + */ | |
| + public function Link($action = null) { | |
| + return $this->data()->Link(($action ? $action : true)); | |
| + } | |
| + | |
| //----------------------------------------------------------------------------------// | |
| // These flexible data methods remove the need for custom code to do simple stuff | |
| /** | |
| * Return the children of a given page. The parent reference can either be a page link or an ID. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -695,11 +695,11 @@ class Form extends RequestHandler { | |
| if ($this->formActionPath) { | |
| return $this->formActionPath; | |
| } elseif($this->controller->hasMethod("FormObjectLink")) { | |
| return $this->controller->FormObjectLink($this->name); | |
| } else { | |
| - return $this->controller->Link($this->name); | |
| + return Controller::join_links($this->controller->Link(), $this->name); | |
| } | |
| } | |
| /** @ignore */ | |
| private $formActionPath = false; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment