WIP
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user