Jump to content

Hari KT

Members
  • Posts

    126
  • Joined

  • Last visited

Posts posted by Hari KT

  1. Hi, 

    Thank you for the wonderful CMF. This is my first question to the PW community as I started with it.

    I am in the process of trying to create a module. The basic need is I want to change the content of the 404 page, if the route is something special.

    Eg : say the request is for http://processwire.localhost/hello and if I know the path doesn't exists I want to do something special.

    public function init()
    {
        $this->addHookBefore('ProcessController::execute', $this, 'someMethod'); 
    }
        
    public function someMethod($event)
    {
        // also how do I access the $_SERVER variables from processwire point of view
    }
    

     Also how do I access the $_SERVER variables from a PW context. Something like $pages->get('SERVER').


    • Like 1
×
×
  • Create New...