From adb17e78d5365dc100c1ba0b937c200878cf794c Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 21 Nov 2008 17:37:42 +0000 Subject: [PATCH] only the synopsis from the asset that is called should be put into the meta description field --- lib/WebGUI/Asset.pm | 14 +++++++------- lib/WebGUI/Asset/Wobject.pm | 7 +++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index df99ac42e..2a14b4fcc 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -1955,12 +1955,6 @@ sub prepareView { name => 'keywords', content => join(',', @keywords), }); - } - if ($self->get('synopsis')) { - $style->setMeta({ - name => 'Description', - content => $self->get('synopsis'), - }); } $style->setRawHeadTags($self->getExtraHeadTags); } @@ -2648,7 +2642,13 @@ sub www_view { return $check if (defined $check); # if all else fails - $self->prepareView; + if ($self->get('synopsis')) { + $self->session->style->setMeta({ + name => 'Description', + content => $self->get('synopsis'), + }); + } + $self->prepareView; $self->session->output->print($self->view); return undef; } diff --git a/lib/WebGUI/Asset/Wobject.pm b/lib/WebGUI/Asset/Wobject.pm index f89cf7b3b..bbe0231a6 100644 --- a/lib/WebGUI/Asset/Wobject.pm +++ b/lib/WebGUI/Asset/Wobject.pm @@ -540,6 +540,13 @@ sub www_view { return $check if (defined $check); $self->session->http->setLastModified($self->getContentLastModified); $self->session->http->sendHeader; + ##Have to dupe this code here because Wobject does not call SUPER. + if ($self->get('synopsis')) { + $self->session->style->setMeta({ + name => 'Description', + content => $self->get('synopsis'), + }); + } $self->prepareView; my $style = $self->processStyle("~~~"); my ($head, $foot) = split("~~~",$style);