add ability to show metadata values in head blocks.
This commit is contained in:
parent
c15ba6147f
commit
36eb8db8fc
43 changed files with 96 additions and 49 deletions
|
|
@ -115,6 +115,28 @@ sub deleteMetaDataField {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getMetaDataAsTemplateVariables
|
||||
|
||||
Returns the metadata as template variables for use in the head block.
|
||||
|
||||
=cut
|
||||
|
||||
sub getMetaDataAsTemplateVariables {
|
||||
my $self = shift;
|
||||
my $var = {};
|
||||
my $meta = {};
|
||||
|
||||
if ($self->session->setting->get("metaDataEnabled")) {
|
||||
$meta = $self->getMetaDataFields();
|
||||
}
|
||||
foreach my $field (keys %$meta) {
|
||||
$var->{$meta->{$field}{fieldName}} = $meta->{$field}{value};
|
||||
}
|
||||
return $var;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getMetaDataFields ( [fieldId] )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue