<?php



    if ($this->path == '/'){

        echo $this->inc('/home', array("lang" => $this->lang));

        return;

    }







    $arr_path = explode('/', $this->path);



    $exception = array();





    if ($arr_path[1] == 'agency'){

        echo $this->inc('/agency', array("lang" => $this->lang, "uid" => $arr_path[2]));

        return;

    }





    if (isset($exception[$arr_path[1]])){

        echo $this->inc($exception[$arr_path[1]] ,  array("lang" => $this->lang));

        return;

    }





    if(is_null(Pimcore\Model\Document::getByPath($this->path)))

        echo $arr_path[1];

        //throw new \Zend_Controller_Router_Exception("No route, document, custom route or redirect is matching the request: " . $this->path . " | \n");



    echo $this->inc($this->path, array("lang" => $this->lang));