From 10b98897d23de98312dc2f17069d0d07fae34279 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 4 Nov 2020 16:10:09 -0700 Subject: [PATCH] Etemplate: Fix sub-templates not expanded and children not processed if id is set but does not expand --- api/src/Etemplate/Widget/Template.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/src/Etemplate/Widget/Template.php b/api/src/Etemplate/Widget/Template.php index 5b57356135..35bb014510 100644 --- a/api/src/Etemplate/Widget/Template.php +++ b/api/src/Etemplate/Widget/Template.php @@ -247,6 +247,10 @@ class Template extends Etemplate\Widget // Check for template from content, and run over it // templates included via template tag have their name to load them from in attribute "template" $expand_name = self::expand_name($this->id ? $this->id : $this->attrs['template'], '','','','',self::$request->content); + if(!$expand_name && $this->id && $this->attrs['template']) + { + $expand_name = $this->attrs['template']; + } if($this->original_name) { $expand_name = self::expand_name($this->original_name, '','','','',self::$request->content);