+ // First try this
+ try {
+ // Load the raw template data
+ $this->loadRawTemplateData($fqfn);
+ } catch (FileNotFoundException $e) {
+ // If we shall load a code-template we need to switch the file extension
+ if ($this->getTemplateType() != $this->getConfigInstance()->readConfig('web_template_type')) {
+ // Switch over to the code-template extension and try it again
+ $ext = $this->getCodeTemplateExtension();
+
+ // Try it again...
+ $this->loadTemplate($template, $ext);
+ } else {
+ // Throw it again
+ throw new FileNotFoundException($fqfn, FrameworkFileInputPointer::EXCEPTION_FILE_NOT_FOUND);
+ }
+ }
+