add ability to show metadata values in head blocks.

This commit is contained in:
Chris Nehren 2008-08-21 18:51:16 +00:00
parent c15ba6147f
commit 36eb8db8fc
43 changed files with 96 additions and 49 deletions

View file

@ -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] )