Hi,
I'm having some difficulty with displaying a dataobject on my page. All I get is a 404 Page not found.
The function I'm using in my controller is this:
class DataBaseResults_Controller extends Page_Controller{
public function init(){
parent::init();
$params = Director::urlParams();
Requirements::css("DataBase/css/callerdatabase.css");
Requirements::javascript("jsparty/jquery/jquery.js");
Requirements::javascript("DataBase/javascript/jquery.tablesorter.min.js");
}
public function ResultsView(){
$params = Director::urlParams();
return (isset($params['Action']) && $params['Action'] == 'viewcase');
}
and in my template:
<a href="{$Top.Link}viewcase/{$ID}"mce_href="{$Top.Link}viewcase/{$ID}" title="Go to the $Title.XML page" class="$LinkingMode levela">View</a>
<% if ResultsView %>
<% if getDisplayResultsDetails %>
<% control getDisplayResultsDetails %>
### display results here ###
<% end_control %>
<% end_if %>
<% end_if %>
I've used this method before in earlier versions of Silverstripe and can't understand why this won't work, any ideas where I'm going wrong?