fix(#123): shared layout not prepended when installing recipe

This commit is contained in:
Benjamin Nussbaum 2025-12-02 15:14:15 +01:00
parent 7c8e55588a
commit 0322ec899e

View file

@ -349,10 +349,13 @@ class PluginImportService
} elseif ($filename === 'shared.liquid') { } elseif ($filename === 'shared.liquid') {
$sharedLiquidPath = $filepath; $sharedLiquidPath = $filepath;
} }
}
// If we found both required files, break the loop // Check if shared.liquid exists in the same directory as full.liquid
if ($settingsYamlPath && $fullLiquidPath) { if ($settingsYamlPath && $fullLiquidPath && ! $sharedLiquidPath) {
break; $fullLiquidDir = dirname((string) $fullLiquidPath);
if (File::exists($fullLiquidDir.'/shared.liquid')) {
$sharedLiquidPath = $fullLiquidDir.'/shared.liquid';
} }
} }