added: Sort Items switch to Syndicated Content asset
This commit is contained in:
parent
0a493211ee
commit
445486e291
4 changed files with 37 additions and 3 deletions
|
|
@ -106,7 +106,14 @@ sub definition {
|
|||
label=>$i18n->get('hasTermsLabel'),
|
||||
hoverHelp=>$i18n->get('hasTermsLabel description'),
|
||||
maxlength=>255
|
||||
}
|
||||
},
|
||||
sortItems => {
|
||||
tab => 'properties',
|
||||
fieldType => 'yesNo',
|
||||
defaultValue => 1,
|
||||
label => $i18n->get('sortItemsLabel'),
|
||||
hoverHelp => $i18n->get('sortItemsLabel description'),
|
||||
},
|
||||
);
|
||||
push(@{$definition}, {
|
||||
assetName=>$i18n->get('assetName'),
|
||||
|
|
@ -185,7 +192,9 @@ sub generateFeed {
|
|||
}
|
||||
|
||||
# sort them by date and remove any duplicate from the OR based term matching above
|
||||
$feed->sort_item();
|
||||
if ($self->get('sortItems')) {
|
||||
$feed->sort_item();
|
||||
}
|
||||
|
||||
# limit the feed to the maximum number of headlines (or the feed generator limit).
|
||||
$feed->limit_item($limit);
|
||||
|
|
|
|||
|
|
@ -244,6 +244,14 @@ our $I18N = {
|
|||
lastUpdated => 1168227896,
|
||||
},
|
||||
|
||||
'sortItemsLabel' => {
|
||||
message => q{Sort feed items by date?},
|
||||
},
|
||||
|
||||
'sortItemsLabel description' => {
|
||||
message => q{If enabled, items will be sorted by date. If disabled, items will be left in the order they appear in the original feed.},
|
||||
},
|
||||
|
||||
'syndicated content asset template variables title' => {
|
||||
message => q|Syndicated Content Asset Template Variables|,
|
||||
lastUpdated => 1164841146
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue