diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index dffb2dd09..ac97d672c 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.10.8 + - rfe #12016 for the top story as well 7.10.7 - rfe #10521: Use monospaced font in template edit textarea diff --git a/lib/WebGUI/Asset/Wobject/StoryTopic.pm b/lib/WebGUI/Asset/Wobject/StoryTopic.pm index d79fd0a2e..ba234f9bc 100644 --- a/lib/WebGUI/Asset/Wobject/StoryTopic.pm +++ b/lib/WebGUI/Asset/Wobject/StoryTopic.pm @@ -236,6 +236,7 @@ sub viewTemplateVariables { my $topStoryVars = shift @{ $var->{story_loop} }; ##Note, this could have saved from the loop above, but this looks more clean and encapsulated to me. my $topStory = WebGUI::Asset->new($session, $topStoryData->{assetId}, $topStoryData->{className}, $topStoryData->{revisionDate}); + $var->{topStory} = $topStoryVars; $var->{topStoryTitle} = $topStory->getTitle; $var->{topStorySubtitle} = $topStory->get('subtitle'); $var->{topStoryUrl} = $session->url->append($self->getUrl, 'func=viewStory;assetId='.$topStoryData->{assetId}), diff --git a/lib/WebGUI/Help/Asset_StoryTopic.pm b/lib/WebGUI/Help/Asset_StoryTopic.pm index 81e8edbde..5becb08ad 100644 --- a/lib/WebGUI/Help/Asset_StoryTopic.pm +++ b/lib/WebGUI/Help/Asset_StoryTopic.pm @@ -29,6 +29,7 @@ our $HELP = { { name => 'editIcon' }, ], }, + { name => 'topStory' }, { name => 'topStoryDeleteIcon', description => 'deleteIcon', }, { name => 'topStoryEditIcon', diff --git a/lib/WebGUI/i18n/English/Asset_StoryTopic.pm b/lib/WebGUI/i18n/English/Asset_StoryTopic.pm index 31626a8e1..fbce2b096 100644 --- a/lib/WebGUI/i18n/English/Asset_StoryTopic.pm +++ b/lib/WebGUI/i18n/English/Asset_StoryTopic.pm @@ -93,6 +93,12 @@ our $I18N = { lastUpdated => 1248191575, }, + 'topStory' => { + message => 'Variable containing the same kind of values as story_loop, but for the topStory. Accessible via topStory.hasPhotos, etc.', + context => 'Template variable.', + lastUpdated => 1294761543, + }, + 'topStoryUrl' => { message => q|The URL to view the top story.|, context => q|Template variable.|,