public function file($name)
    {
        $usephp = c::get('twig.usephp', true);
        $base = str_replace('\\', '/', $this->kirby->roots()->templates().'/'.$name);
        $twig = $base . '.twig';
        $php  = $base . '.php';

        // only check existing files if PHP template support is active
        if ($usephp and !is_file($twig) and is_file($php)) {
            return $php;
        } else {
            return $twig;
        }
    }
public function file($name)
    {
        $usephp = c::get('twig.usephp', true);
        $base = str_replace('\\', '/', $this->kirby->roots()->templates().'/'.$name);
        $twig = $base . '.twig';
        $php  = $base . '.php';

        // only check existing files if PHP template support is active
        if ($usephp and !is_file($twig) and is_file($php)) {
            return $php;
        } else {
            return $twig;
        }
    }
Returns a template file path by name
@param string $name
@return string