I have an app that is converting the html result from view->getRender() into another file format. It does this by looping over files in a separate View dir and then calls view->getRender() for each one, the problem I'm having is that view->getRender() is only working for the first view in the directory and returns string '' (length=0) for any subsequent view.
Sample code:
        $iterator = new \DirectoryIterator($viewDir);
        $view = clone $this->view;
        $view->setViewsDir($viewDir);
        foreach($iterator as $ff) {
            if ($ff->isFile()) {
                $html = $view->getRender('Documentation', $ff->getBasename('.volt'));
                var_dump($ff->getBasename());
                var_dump($html);
            }
        }
Any ideas?