[eluser]tonanbarbarian[/eluser]
firstly in your view the variable would be $someStaticData not $x
secondly because you are assigning the result of the method call to $data its value is overwritten
you could pass $data to the method and either add to it and return it, or pass it by reference
Code:
function detail($id, $data) {
$detail[name] = $row->name;
$detail[body] = $row->body;
return detail;
} // detail()
Code:
$data['someStaticData'] = 'x';
$data = $this-Myclass->detail($id, $data);
OR
Code:
function detail($id, &$data) {
$detail[name] = $row->name;
$detail[body] = $row->body;
} // detail()
Code:
$data['someStaticData'] = 'x';
$this-Myclass->detail($id, $data);