Beginning of Topic showing an Story.

Story now has a crumb trail.  Needs to be added to template vars and to template.
This commit is contained in:
Colin Kuskie 2009-03-20 00:08:47 +00:00
parent e06d53c122
commit 4867750fd9
3 changed files with 159 additions and 13 deletions

View file

@ -120,12 +120,6 @@ sub view {
return $self->processTemplate($var, undef, $self->{_viewTemplate});
}
sub www_view {
my $self = shift;
$self->{_standAlone} = 1;
return $self->SUPER::www_view;
}
#-------------------------------------------------------------------
=head2 viewTemplateVars ( )
@ -178,6 +172,48 @@ sub viewTemplateVariables {
return $var;
}
#-------------------------------------------------------------------
=head2 www_view ( )
Overside the method inherited from Wobject to set the mode so template
variables are set correctly in viewTemplateVars.
=cut
sub www_view {
my $self = shift;
$self->{_standAlone} = 1;
return $self->SUPER::www_view;
}
#-------------------------------------------------------------------
=head2 www_viewStory ( )
Display a story, set in the form variable assetId
=cut
sub www_viewStory {
my $self = shift;
my $session = $self->session;
my $storyId = $session->form->get('assetId');
my $story;
if ($storyId) {
$story = WebGUI::Asset->new($session, $storyId);
}
if (! $story) {
my $notFound = WebGUI::Asset->getNotFound($session);
$session->asset($notFound);
return $notFound->www_view;
}
$story->topic($self);
return $story->www_view;
}
1;
#vim:ft=perl