- } catch (FilePointerNotOpenedException $e) {
- // Template not found, but maybe variable assigned?
- if ($this->isVariableAlreadySet($template) !== false) {
- // Use that content here
- $this->loadedRawData[$template] = $this->readVariable($template);
-
- // Recursive protection:
+ } else {
+ // Then try to search for code-templates
+ try {
+ // Load the code template and remember it's contents
+ $this->loadCodeTemplate($template);
+ $this->loadedRawData[$template] = $this->getRawTemplateData();
+
+ // Remember this template for recursion detection
+ // RECURSIVE PROTECTION!