You need to hook into the controller and add the module. E.g.: public function profileController_render_before($sender) { $sender->addModule('SideMenuModule', 'Content');}
If you are unsetting a module that is added via a plugin, you need to make sure your code runs after the module gets added. Or modifying the plugin to not add the module in the first place. Why are you looking to add the SideMenuModule to the Content asset?
public function profileController_render_before($sender) { unset($sender->Assets['Panel']['ProfileFilterModule']); unset($sender->Assets['Panel']['OnlineNowModule']); //doesn't work unset($sender->Assets['Panel']['SideMenuModule']); $sender->addModule('SideMenuModule', 'Content'); //doesn't work } Usage echo…