This commit is contained in:
2025-05-07 09:20:08 -07:00
parent 6775e444b9
commit 0a11ffd3f4

View File

@@ -55,14 +55,14 @@ class RadThemeEngine
{
return function ($template, $context, $args, $source) {
$output = "";
die(var_dump($context->get($args)));
$groups = json_decode($context->get($args));
if (!is_iterable($context->get($args))) {
return "Sorry, the item you passed to the flex helper is not iterable.";
}
$groups = $context->get($args);
foreach ($groups as $g) {
$data = [];
foreach ($g->fields as $f) {
$data[$f->name] = $f->value;
}
$output .= site()->render($g->tpl, $data);
$output .= site()->render($g->tpl, $g);
}
return $output;
};