diff --git a/Documentation/PageTsconfig/Mod/WebList.rst b/Documentation/PageTsconfig/Mod/WebList.rst index 8bfc046..a70963e 100644 --- a/Documentation/PageTsconfig/Mod/WebList.rst +++ b/Documentation/PageTsconfig/Mod/WebList.rst @@ -200,6 +200,62 @@ Example: Hide the column selector mod.web_list.displayColumnSelector = 0 +.. _pageTsConfigWebList-downloadPresets: + +downloadPresets +=============== + +.. confval:: downloadPresets.[table] + :name: mod-web-list-downloadPresets + :type: array of presets + + .. versionadded:: 13.2 + A new feature has been introduced, adding the ability to pick the exported + data columns from a list of configurable presets. + + This property adds presets of preselected fields to the download area in + the :guilabel:`Web > List` backend module. + + Those presets can be configured via page TSconfig, and can also be + overridden via user TSconfig (for example, to expand certain presets + only to specific users). + + Each entry of :typoscript:`mod.web_list.downloadPresets` + defines the table name on the first level, followed by + any number of presets. + + Each preset contains a :typoscript:`label` (the displayed name of the preset, + which can be a locallang key), a comma-separated list of each column that + should be included in the export as :typoscript:`columns` and optionally + a :typoscript:`identifier`. In case :typoscript:`identifier` is not provided, + the identifier is generated as hash of the :typoscript:`label` and + :typoscript:`columns`. + + Since any table can be configured for a preset, any extension + can deliver a defined set of presets through the + :file:`EXT:my_extension/Configuration/page.tsconfig` file and + their table name(s). + + .. todo:: Link event after it is merged + + Additionally, the list of presets can be manipulated via the event + `BeforeRecordDownloadPresetsAreDisplayedEvent`. + +.. _pageTsConfigWebList-downloadPresets-example: + +Example: Create download presets for table page +----------------------------------------------- + +.. literalinclude:: _WebList/_downloadPresets.tsconfig + :caption: EXT:my_extension/Configuration/page.tsconfig + +This can be manipulated with user TSConfig by adding the :typoscript:`page.` +prefix. User TSConfig is loaded after page TSConfig, so you can overwrite +existing keys or replace the whole list of keys: + +.. literalinclude:: _WebList/_downloadPresets.tsconfig + :caption: EXT:my_extension/Configuration/user.tsconfig + .. index:: enableClipBoard Buttons; Show clipboard diff --git a/Documentation/PageTsconfig/Mod/_WebList/_downloadPresets.tsconfig b/Documentation/PageTsconfig/Mod/_WebList/_downloadPresets.tsconfig new file mode 100644 index 0000000..3c96b1d --- /dev/null +++ b/Documentation/PageTsconfig/Mod/_WebList/_downloadPresets.tsconfig @@ -0,0 +1,14 @@ +mod.web_list.downloadPresets { + pages { + 10 { + label = Quick overview + columns = uid, title, crdate, slug + } + + 20 { + identifier = LLL:EXT:myext/Resources/Private/Language/locallang.xlf:preset2.label + label = UID and titles only + columns = uid, title + } + } +} \ No newline at end of file diff --git a/Documentation/PageTsconfig/Mod/_WebList/_downloadPresetsUser.tsconfig b/Documentation/PageTsconfig/Mod/_WebList/_downloadPresetsUser.tsconfig new file mode 100644 index 0000000..92b3013 --- /dev/null +++ b/Documentation/PageTsconfig/Mod/_WebList/_downloadPresetsUser.tsconfig @@ -0,0 +1,13 @@ +page.mod.web_list.downloadPresets { + pages { + 10 { + label = Quick overview (customized) + columns = uid, title, crdate, slug + } + + 30 { + label = Short with URL + columns = uid, title, slug + } + } +} \ No newline at end of file