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.
Properties
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
Copied!
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
Copied!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
Copied!
Include subcategories includeSubCategories
¶
-
includeSubCategories
¶ -
- type
-
boolean
- Default
- Path
-
plugin.tx_news.settings
- Scope
-
Plugin, TypoScript Setup
Include subcategories in the category selection
plugin.tx_news.settings.includeSubCategories = 1
Copied!
Archive archiveRestriction
¶
-
archiveRestriction
¶ -
- type
-
string
- Default
-
(none)
- Path
-
plugin.tx_news.settings
- Scope
-
Plugin, TypoScript Setup
plugin.tx_news.settings.archiveRestriction = active
Copied!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
: 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.
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
Copied!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
plugin.tx_news.settings.topNewsRestriction =2
Copied!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.
Show a single news record singleNews
¶
-
singleNews
¶ -
- type
-
int
- Default
- Path
-
plugin.tx_news.settings
- Scope
-
Plugin, TypoScript Setup
plugin.tx_news.settings.singleNews =789
Copied!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
Copied!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 recursive
¶
-
recursive
¶ -
- type
-
int
- Default
-
0 (No recursion)
- Path
-
plugin.tx_news.settings
- Scope
-
Plugin, TypoScript Setup
plugin.tx_news.settings.recursive = 2
Copied!The search for pages as startingpoint can be extended by setting a recursive level.
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
Copied!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
Copied!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
Copied!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
Copied!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
Copied!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
¶
-
- 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
Copied!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
Copied!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
Copied!Select different layouts. See this section how to add layouts.