public function LinkFor($remoteObject, $action = null) { $link = parent::RelativeLink(); $id = $remoteObject->ID; // otherwise, we're after $this link (view) plus id return Controller::join_links($link, $action, $id); }