0

I'm trying to add a tag to the <head> of all CP pages. I'd think that I can use the core_boot hook and the if (REQ === 'CP') logic to trigger ee()->cp->add_to_head('thing');, but I'm getting the error No such property: 'cp' on ExpressionEngine\Legacy\Facade.

InvalidArgumentException

From what I can see, ee()->extensions->call('core_boot') is called after ee()->core->run_ee(); in Controller.php. And run_ee() has multiple calls to ee()->cp as well as ee()->load->library('cp');, so it seems like I should be able to use ee()->cp->add_to_head() in core_boot.

Am I approaching this wrong? What am I missing here?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.