Fix sub-templates may not have been properly validated

3rd try
This commit is contained in:
nathan 2024-12-12 08:58:48 -07:00
parent 9e84456e21
commit 4a1455d05e

View File

@ -252,7 +252,7 @@ class Template extends Etemplate\Widget
$expand_name = self::expand_name($this->original_name, '','','','',self::$request->content);
}
//error_log("$this running $method_name() cname: {$this->id} -> expand_name: $expand_name");
if($expand_name && $expand_name != $this->id)
if($expand_name && ($expand_name != $this->id || count($this->children) == 0))
{
if (($row_template = self::instance($expand_name)))
{