Uncanny timing...I was working with a DataObject Class that I wanted to use this method as well....
Okay so it totally has to do with 2.4 and nested urls...the issue is two fold (at least the solution that I got to work).
1. In the Page class you now should define allowed actions.
static $allowed_actions = array(
'actionName'
);
The catch here is that now your urls will have to have this defined action. You cannot just use the $ID b/c it is dynamic and you won't be able to define all those in the $allowed_actions array.
2. Okay so you will have to tweak you code some to look for your action and the parameter now as well. Here is what I did.
public function getIndividualDataObject(){
if ($this->request->latestParam('Action')) {
$parameter = $this->request->latestParam('ID');
if ($parameter) {
$DataObjectID = Convert::raw2xml($parameter);
if($DataObjectID){
$DataObjectInfo = DataObject::get_by_id('DataObjectClassName', $DesignGuideID);
return $DataObjectInfo;
}
}
}
}
Now lastly you will need to update your links that call your Single DataObjects to include the action that you added to your $allowed_actions. Example.
{$Top.Link}actionName/{$ID}
Hope this helps...
- Ed