Hide/Remove Buttons from 'View Page'

Hello.

I would like to hide the drop downs that appear at the top of a view page (the ‘Action’ drop down and the Master/Detail drop down). I’ve used the following before to hide the Master/Detail add button but I’m not sure how to alter it to fit what I’m doing.

$this->OtherOptions[“detail”]->Items[“detailsadd”]->Visible = FALSE;

You may check what the properties contain first, then find the right key to use, e.g.

var_dump($this->OtherOptions);