Plugin¶
Properties¶
Property | Data type | Default | Available in plugin |
---|---|---|---|
orderBy | string | datetime | [x] |
orderDirection | string | desc | [x] |
categories | string | [x] | |
categoryConjunction | string | [x] | |
includeSubCategories | boolean | 0 | [x] |
archiveRestriction | string | [x] | |
timeRestriction | string | [x] | |
topNewsRestriction | string | [x] | |
startingpoint | string | [x] | |
recursive | integer | [x] | |
singleNews | integer | [x] | |
enablePreviewOfHiddenRecords | integer | [x] | |
dateField | integer | datetime | [x] |
detailPid | integer | [x] | |
backPid | integer | [x] | |
listPid | integer | [x] | |
limit | integer | [x] | |
offset | integer | [x] | |
topNewsFirst | integer | [x] | |
excludeAlreadyDisplayedNews | integer | [x] | |
disableOverrideDemand | integer | [x] |
Property details¶
orderBy¶
plugin.tx_news.settings.orderBy =
string
Define the sorting of displayed news records.
The chapter “Extend news > Extend flexforms” shows how the select box can be extended.
orderDirection¶
plugin.tx_news.settings.orderDirection =
string
Define the sorting direction which can either be “asc” for ascending or “desc” descending.
categories¶
plugin.tx_news.settings.categories =
1,2,3
Define the news categories which are taken into account when getting the correct news records.
Caution
Don’t forget to set the category mode too! See property below.
categoryConjunction¶
plugin.tx_news.settings.categoryConjunction =
or
The category mode defines who selected categories are checked. 5 options are available:
1) Don’t care, show all
There is no restriction based on categories, even if categories are defined.
2) Show items with selected categories (OR)
All news records which belong to at least one of the selected categories are shown.
3) Show items with selected categories (AND)
All news records which belong to all selected categories are shown.
4) Do NOT show items with selected categories (OR)
This is the negation of #2. All news records which don’t belong to any of the selected categories are shown.
5) Do NOT show items with selected categories (AND)
This is the negation of #3. All news records which don’t belong to all selected categories are shown.
includeSubCategories¶
plugin.tx_news.settings.includeSubCategories =1
Include subcategories in the category selection
archiveRestriction¶
plugin.tx_news.settings.archiveRestriction =1
News records can hold an optional archive date. 2 modes are available:
active: Only active (non archived)
All news records with an archive date before the current date are shown.
archived: Archived
All news records with an archive date in the past are shown.
Hint
Records with no archive date aren’t shown in any of the selected modes.
timeRestriction¶
plugin.tx_news.settings.timeRestriction =-1 week
The time limit offers 2 different options:
Time in seconds
Only news records with a maximum age (compared to the “Date & Time” field) are shown.
Example: An input like “86400” shows only news records which are one day (60 seconds * 60 minutes * 24 hours) old.
Time in words
It is also possible to define the maximum age in words. Examples are:
- 3 days
- last Monday
- 10 months 3 days 2 hours
Words need to be in English and are translated by using strtotime .
topNewsRestriction¶
plugin.tx_news.settings.topNewsRestriction =2
Any news record can be set as “Top News”. Therefore it is possible to show news records depending on this flag.
1: Only Top News records
Only news records which the checkbox set are shown.
2: Except Top News records
Only news records which don’t have the checkbox set are shown.
startingpoint¶
plugin.tx_news.settings.startingpoint =12,345
If a startingpoint is set, all news records which are saved on one of the selected pages are shown, otherwise news of all pages are shown.
recursive¶
plugin.tx_news.settings.recursive = 2
The search for pages as startingpoint can be extended by setting a recursive level.
singleNews¶
plugin.tx_news.settings.singleNews =789
It is possible to show a specific news record in the Detail view if the uid is set with this property.
dateField¶
plugin.tx_news.settings.dateField =1
The date menu builds a menu by year and month and the given news records. The menu can either be built by using the date field or the archive field.
detailPid¶
plugin.tx_news.settings.detailPid =12
This page is uses as target for the detail view. If nothing set, the current page is used. Be aware that this setting gets overridden (if set by TS pidDetailFromCategories) and a detail pid inside related category records.
backPid¶
plugin.tx_news.settings.backPid =12
Define a page for the detail view to return to. This is typically the page on which the list view can be found.
listPid¶
plugin.tx_news.settings.listPid =12
This page is uses as target for the listings, e.g. the date menu and the Search form.
limit¶
plugin.tx_news.settings.limit =10
Define the maximum records shown.
Note
This is not about the pagination but a general limit!
offset¶
plugin.tx_news.settings.offset =3
Define the offset. If set to e.g. 2, the first 2 records are not shown. This is especially useful in combination with multiple plugins on the same page and the setting “Max records displayed”.
topNewsFirst¶
plugin.tx_news.settings.topNewsFirst =1
If checked, news records with the checkbox “Top News” are shown before the others, no matter which sorting configuration is used.
excludeAlreadyDisplayedNews¶
plugin.tx_news.settings.excludeAlreadyDisplayedNews =1
If checked, news items which are already rendered are excluded in the current plugin. To exclude news items, the viewHelper <n:excludeDisplayedNews newsItem=”{newsItem}” /> needs to be added to the template.
Note
The order of rendering in the frontend is essential as the information which news record is shown and should not be included anymore is fetched during runtime.
disableOverrideDemand¶
plugin.tx_news.settings.disableOverrideDemand =1
If set, the settings of the plugin can’t be overridden by arguments in the URL. The override is used, e.g. to show only news of a given category (category given in the URL).
cropMaxCharacters¶
plugin.tx_news.settings.cropMaxCharacters =100
Define the maximum length of the teaser text before it is cropped.
templateLayout¶
plugin.tx_news.settings.templateLayout = 123
Select different layouts. See the section Templating > Custom Templates by using the Layout selector