Revoke the previous page-level hierarchial keywords work, in favor of forthcoming work on wiki level keywords work

This commit is contained in:
Colin Kuskie 2010-04-21 16:55:16 -07:00
parent 776397bfa9
commit d085d7d04a
6 changed files with 2 additions and 112 deletions

View file

@ -309,35 +309,11 @@ sub getTemplateVars {
$self->scrubContent,
{skipTitles => [$self->get('title')]},
),
isKeywordPage => $self->isKeywordPage,
isSubscribed => $self->isSubscribed,
subscribeUrl => $self->getSubscribeUrl,
unsubscribeUrl => $self->getUnsubscribeUrl,
owner => $owner->get('alias'),
};
my @keyword_pages = ();
if ($var->{isKeywordPage}) {
my $paginator = $keyObj->getMatchingAssets({
startAsset => $self->getWiki,
keyword => $self->get('title'),
usePaginator => 1,
});
PAGE: foreach my $assetId (@{ $paginator->getPageData }) {
next PAGE if $assetId->{assetId} eq $self->getId;
my $asset = WebGUI::Asset->newByDynamicClass($session, $assetId->{assetId});
next PAGE unless $asset;
push @keyword_pages, {
title => $asset->getTitle,
url => $asset->getUrl,
};
}
$paginator->appendTemplateVars($var);
@keyword_pages = map { $_->[1] }
sort
map { [ lc $_->{title}, $_ ] }
@keyword_pages;
}
$var->{keyword_page_loop} = \@keyword_pages;
return $var;
}

View file

@ -107,17 +107,6 @@ our $HELP = {
name => 'owner',
description => 'help owner',
},
{ 'name' => 'isKeywordPage', },
{ 'name' => 'keyword_page_loop',
'variables' => [
{ 'name' => 'title',
'description' => 'keyword page title',
},
{ 'name' => 'url',
'description' => 'keyword page url',
},
],
},
],
related => [],
},

View file

@ -333,30 +333,6 @@ our $I18N =
context => 'Label for asset property',
},
'isKeywordPage' => {
message => q{A boolean that is true if this page is a keyword page.},
lastUpdated => 0,
context => 'template variable help',
},
'keyword_page_loop' => {
message => q{If this page is a keyword page, then this loop will contain a list of all pages tagged with this page's keyword. The pagination variables will apply to the list of pages in this loop. If this page is not a keyword page, the loop will be blank, and the pagination variables will not be present.},
lastUpdated => 0,
context => 'template variable help',
},
'keyword page title' => {
message => q{The title of a page that has this keyword.},
lastUpdated => 0,
context => 'template variable help',
},
'keyword page url' => {
message => q{The URL to a page that has this keyword. The URL will have the gateway URL prepended to it.},
lastUpdated => 0,
context => 'template variable help',
},
};
1;