Lets i post my look at this implementation:
adding to dispatch one more condition if (!is_object($controller))

dispatcher.php

        function dispatch($url = null, $additionalParams = array()) {
                if ($this->base === false) {
                        $this->base = $this->baseUrl();
                }
                if ($url !== null) {
                        $_GET['url'] = $url;
                }

                $url = $this->getUrl();
                $this->here = $this->base . '/' . $url;

                if ($this->cached($url)) {
                        exit();
                }

                $this->params = array_merge($this->parseParams($url),
$additionalParams);

                $controller = $this->__getController();

                // HANDLE DB TREE
                if (!is_object($controller)) {
                        $_GET['url'] = 'sitepages/index/'.$_GET['url'];
                        $url = $this->getUrl();
                        $this->here = $this->base . '/' . $url;

                        if ($this->cached($url)) {
                                exit();
                        }
                        $this->params = array_merge($this->parseParams($url),
$additionalParams);
                        $controller = $this->__getController();
                }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to