From 273ea90a84acc0b09e79f2635f5e5d76d20461e9 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 3 Dec 2025 23:34:05 +0000 Subject: [PATCH] Fix _collect_all_layouts() to find sublayouts on $content element MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/RSpade/Core/SPA/Spa.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/RSpade/Core/SPA/Spa.js b/app/RSpade/Core/SPA/Spa.js index f343e80ec..3e5c7a46a 100755 --- a/app/RSpade/Core/SPA/Spa.js +++ b/app/RSpade/Core/SPA/Spa.js @@ -889,14 +889,12 @@ class Spa { layouts.push(current); // Look for nested layout in $content + // Note: Sublayouts are placed directly ON the $content element (container becomes component) const $content = current.$sid ? current.$sid('content') : null; if (!$content || !$content.length) break; - const $child = $content.children().first(); - if (!$child.length) break; - - const child_component = $child.component(); - if (child_component && child_component instanceof Spa_Layout) { + const child_component = $content.component(); + if (child_component && child_component !== current && child_component instanceof Spa_Layout) { current = child_component; } else { break;