lib/View.php
public function generateTemplateFileName()
    {
        $template = $this->getFileName() . '.twig';
        $templatePath = preg_replace('/Views/i', 'templates', TEMPLATEPATH);

        if (!file_exists($templatePath . $template)) {
            $templateWithDashes = $this->getFileNameDashedCase() . '.twig';
            if (file_exists($templatePath . $templateWithDashes)) {
                return $templateWithDashes;
            }
        }

        return $template;
    }
public function generateTemplateFileName()
    {
        $template = $this->getFileName() . '.twig';
        $templatePath = preg_replace('/Views/i', 'templates', TEMPLATEPATH);

        if (!file_exists($templatePath . $template)) {
            $templateWithDashes = $this->getFileNameDashedCase() . '.twig';
            if (file_exists($templatePath . $templateWithDashes)) {
                return $templateWithDashes;
            }
        }

        return $template;
    }
Generate a Template file path from the namespace (after \Views) and
class name of the view. Be sure to keep Views in the \Views namespace.

@return string template file path