Template::findTemplate() 

\nn\t3::Template()->findTemplate($view = NULL, $templateName = ''); 

Finds a template in an array of possible templatePaths of the view

\nn\t3::Template()->findTemplate( $this->view, 'example.html' );
Copied!

| @return string

Source Code 

public function findTemplate( $view = null, $templateName = '' ) {
	$paths = array_reverse($view->getTemplateRootPaths());
	$templateName = pathinfo( $templateName, PATHINFO_FILENAME );
	foreach ($paths as $path) {
		if (\nn\t3::File()->exists( $path . $templateName . '.html')) {
			return $path . $templateName . '.html';
		}
		if (\nn\t3::File()->exists( $path . $templateName)) {
			return $path . $templateName;
		}
	}
	return false;
}
Copied!