From 0ce287c212f52d04c134a51a49c3646b9b755701 Mon Sep 17 00:00:00 2001 From: Roy Johnson Date: Tue, 7 Nov 2006 16:42:41 +0000 Subject: [PATCH] fix - Style templates now process metadata properties assigned to them --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Session/Style.pm | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index fde947568..527263974 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -26,6 +26,7 @@ - change: Asset::getContainer no longer changes the session asset - fix: Survey numeric multiple choice options - fix: inability to create shortcuts to threads + - fix: Style templates do not render metadata 7.1.4 - Template variables in the main Survey Template were out of date in the diff --git a/lib/WebGUI/Session/Style.pm b/lib/WebGUI/Session/Style.pm index d492076c6..d04e8e2cc 100644 --- a/lib/WebGUI/Session/Style.pm +++ b/lib/WebGUI/Session/Style.pm @@ -200,6 +200,13 @@ if ($self->session->user->isInGroup(2) || $self->session->setting->get("preventP my $output; if (defined $style) { $var{'head.tags'} .= $style->get("headBlock"); + my $meta = {}; + if ($self->session->setting->get("metaDataEnabled")) { + $meta = $style->getMetaDataFields(); + } + foreach my $field (keys %$meta) { + $var{$meta->{$field}{fieldName}} = $meta->{$field}{value}; + } $output = $style->process(\%var); } else { $output = "WebGUI was unable to instantiate your style template.".$var{'body.content'};