Plugin settings¶
This section covers all settings, which can be defined in the plugin itself.
To improve the usability, only those settings are shown which are needed by
the chosen view (The setting orderBy
is for example not needed in the single view).
Important
Every setting can also be defined by TypoScript setup. However, please inform
yourself about the setting overrideFlexformSettingsIfEmpty
.
Sheet general¶
Sort by orderBy
¶
- orderBy¶
- Type
string
- Default
'datetime'
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
Define the sorting of displayed news records. The chapter "Extend news > Extend flexforms" shows how the select box can be extended.
Sort direction orderDirection
¶
- orderDirection¶
- Type
string
- Default
'desc'
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
Define the sorting direction which can either be "asc" for ascending or "desc" descending. This can be either asc or desc.
plugin.tx_news.settings.orderDirection = asc
Date field to use dateField
¶
- dateField¶
- Type
string
- Default
'datetime'
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
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.
Category selection categories
¶
- categories¶
- Type
string
- Default
(none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
Define the news categories which are taken into account when getting the correct news records
plugin.tx_news.settings.categories = 1,2,3
Caution
Don't forget to set the category mode too! See property below.
Category mode categoryConjunction
¶
- categoryConjunction¶
- Type
int
- Default
0 (Don't care, show all)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
The category mode defines how 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.
plugin.tx_news.settings.categoryConjunction = 2
Include subcategories includeSubCategories
¶
- includeSubCategories¶
- Type
boolean
- Default
0
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
Include subcategories in the category selection
plugin.tx_news.settings.includeSubCategories = 1
Archive archiveRestriction
¶
- archiveRestriction¶
- Type
string
- Default
(none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
plugin.tx_news.settings.archiveRestriction = active
News records can hold an optional archive date. 2 modes are available:
active
: Only active (non archived)All news records with an archive date in the future are shown.
archived
: ArchivedAll 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.
Time limit (LOW) timeRestriction
¶
- timeRestriction¶
- Type
string
- Default
(none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
plugin.tx_news.settings.timeRestriction =-1 week
The time limit offers 3 different options.
Date
A date in the format
HH:mm DD-MM-YYYY
can be set and only news records that are newer than this date are shown.Example: 15:30 01-04-2020 (April 1st, 2020 at 3.30 pm)
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 .
Time limit (HIGH) timeRestrictionHigh
¶
- timeRestrictionHigh¶
- Type
string
- Default
(none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
See
timeRestriction
above. The configuration is the same but for the higher time end.
Top news topNewsRestriction
¶
- topNewsRestriction¶
- Type
int
- Default
0
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 recordsOnly news records which the checkbox set are shown.
2
: Except Top News recordsOnly news records which don't have the checkbox set are shown.
Show a single news record singleNews
¶
- singleNews¶
- Type
int
- Default
0
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
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.
Startingpoint startingpoint
¶
- startingpoint¶
- Type
string
- Default
(none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
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.
Sheet additional¶
PageId for single news display detailPid
¶
- detailPid¶
- Type
int
- Default
0 (none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
plugin.tx_news.settings.detailPid =12
This page is used as target for the detail view. If nothing set, the current page is used.
Hint
Be aware that this setting might not be used, depending on the setting
detailPidDetermination
.
PageId for list display listPid
¶
- listPid¶
- Type
int
- Default
0 (none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
plugin.tx_news.settings.listPid =12
This page is used as target for the listings, for example the date menu and the search form.
PageId to return to backPid
¶
- backPid¶
- Type
int
- Default
0 (none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
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.
Max records displayed limit
¶
- limit¶
- Type
int
- Default
0 (none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
plugin.tx_news.settings.limit =10
Define the maximum records shown.
Starting with given news record offset
¶
- offset¶
- Type
int
- Default
(none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
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
limit
.
Tags tags
¶
- tags¶
- Type
string
- Default
(none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
Add a constraint to the given tags
Hide the pagination hidePagination
¶
- hidePagination¶
- Type
boolean
- Default
0 (do not hide)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
If defined, the pagination is not shown.
Items per Page list.paginate.itemsPerPage
¶
- list.paginate.itemsPerPage¶
- Type
int
- Default
10
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
Define the amount of news items shown per page in the pagination.
Sort "Top news" before topNewsFirst
¶
- topNewsFirst¶
- Type
boolean
- Default
0 (Do not show top news first)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
plugin.tx_news.settings.topNewsFirst =1
If set, news records with the checkbox "Top News" are shown before the others, no matter which sorting configuration is used.
Exclude already displayed news excludeAlreadyDisplayedNews
¶
- excludeAlreadyDisplayedNews¶
- Type
boolean
- Default
0 (Do not exclude)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
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.
Disable override demand disableOverrideDemand
¶
Sheet template¶
Max width for media elements media.maxWidth
¶
- media.maxWidth¶
- Type
int
- Default
0 (none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
Maximum width of assets
Max height for media elements media.maxHeight
¶
- media.maxHeight¶
- Type
int
- Default
0 (none)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
Maximum height of assets
Template Layout templateLayout
¶
- templateLayout¶
- Type
string
- Default
(none, use default)
- Path
plugin.tx_news.settings
- Scope
Plugin, TypoScript Setup
plugin.tx_news.settings.templateLayout = 123
Select different layouts. See this section how to add layouts.