1

An older accesoire add-on i have have, uses
if($this->EE->input->get('C') == 'content_publish'){ ... }
to determine if we're on the publish page.

Since 2.8/2.9 the cp url structure changed
example.com/system/index.php?/cp/content_publish/entry_form&channel_id=3&S=x

  1. Could check the uri class segments
  2. Could check EE->router->class and ->method

What are current/good methods to determine control panel pages we're on?

4

ee()->router->fetch_class() and ee()->router->fetch_method() should always reveal that information to you, regardless of the URL pattern or special routing.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.