add field and loop accessors
This commit is contained in:
parent
52919f7586
commit
9cb5c088b0
1 changed files with 5 additions and 1 deletions
|
|
@ -224,10 +224,14 @@ sub toTemplateVars {
|
||||||
my $props = $field->toTemplateVars;
|
my $props = $field->toTemplateVars;
|
||||||
# Add the whole field to the vars
|
# Add the whole field to the vars
|
||||||
$props->{ field } = $field->toHtml;
|
$props->{ field } = $field->toHtml;
|
||||||
|
$var->{ "${prefix}_field_${name}" } = $props->{ field };
|
||||||
|
push @{$fieldLoop}, $props;
|
||||||
|
# Individual accessor
|
||||||
for my $key ( keys %{$props} ) {
|
for my $key ( keys %{$props} ) {
|
||||||
$var->{ "${prefix}_field_${name}_${key}" } = $props->{$key};
|
$var->{ "${prefix}_field_${name}_${key}" } = $props->{$key};
|
||||||
}
|
}
|
||||||
push @{$fieldLoop}, $props;
|
# Loop accessor
|
||||||
|
push @{$var->{ "${prefix}_field_${name}_loop" }}, $props;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# $prefix_fieldsetloop
|
# $prefix_fieldsetloop
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue