Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
[TASK] Turn subproperties into confvals (#519)
Browse files Browse the repository at this point in the history
This is a preparation for TYPO3-Documentation/Changelog-To-Doc#801

Subproperties can then be linked and deprecated separately.

Releases: main, 12.4, 11.5
  • Loading branch information
linawolf authored May 30, 2024
1 parent 3fd67e0 commit 56c2822
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 72 deletions.
173 changes: 101 additions & 72 deletions Documentation/PageTsconfig/Mod/Wizards.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.. include:: /Includes.rst.txt

.. index:: Wizards

.. _page-mod-wizard:

=======
wizards
=======
Expand All @@ -18,115 +19,143 @@ The `wizards` section allows to customize the *New record wizard* and the
newContentElement.wizardItems
=============================

.. confval:: newContentElement.wizardItems
:name: mod-wizards-newContentElement-wizardItems
:type: array
.. confval-menu::
:display: tree

.. confval:: newContentElement.wizardItems
:name: mod-wizards-newContentElement-wizardItems
:type: array
:Path: mod.wizards.newContentElement.wizardItems

In the new content element wizard, content element types are grouped
together by type. Each such group can be configured independently. The
four default groups are: `common`, `special`, `forms` and `plugins`.

The configuration options below apply to any group.

.. confval:: [group].before
:name: mod-wizards-newContentElement-wizardItems-group-before
:type: string
:Path: mod.wizards.newContentElement.wizardItems.[group].before

Sorts [group] in front of the group given.

.. confval:: [group].after
:name: mod-wizards-newContentElement-wizardItems-group-after
:type: string
:Path: mod.wizards.newContentElement.wizardItems.[group].after

Sorts [group] after the group given.

.. confval:: [group].header
:name: mod-wizards-newContentElement-wizardItems-group-header
:type: string | localized string
:Path: mod.wizards.newContentElement.wizardItems.[group].header

Name of the group.

.. confval:: [group].show
:name: mod-wizards-newContentElement-wizardItems-group-show
:type: string, comma-separated list of items
:Path: mod.wizards.newContentElement.wizardItems.[group].show

In the new content element wizard, content element types are grouped
together by type. Each such group can be configured independently. The
four default groups are: "common", "special", "forms" and "plugins".
Name of the group.

The configuration options below apply to any group.
Comma-separated list of items to show in the group. Use `*` to show
all, example:

mod.wizards.newContentElement.wizardItems.[group].before
(string) Sorts [group] in front of the group given.
.. code-block:: typoscript
:caption: EXT:site_package/Configuration/page.tsconfig
mod.wizards.newContentElement.wizardItems.[group].after
(string) Sorts [group] after the group given.
# Hide bulletList
mod.wizards.newContentElement.wizardItems.common.show := removeFromList(bullets)
# Only show text and textpic in common
mod.wizards.newContentElement.wizardItems.common.show = text,textpic
mod.wizards.newContentElement.wizardItems.[group].header
(localized string) Name of the group.
mod.wizards.newContentElement.wizardItems.[group].show
(string) Comma-separated list of items to show in the group. Use `*` to show all, example:
.. confval:: [group].elements
:name: mod-wizards-newContentElement-wizardItems-group-elements
:type: array
:Path: mod.wizards.newContentElement.wizardItems.[group].elements

.. code-block:: typoscript
:caption: EXT:site_package/Configuration/page.tsconfig
List of items in the group.

# Hide bulletList
mod.wizards.newContentElement.wizardItems.common.show := removeFromList(bullets)
# Only show text and textpic in common
mod.wizards.newContentElement.wizardItems.common.show = text,textpic
.. confval:: [name]
:name: mod-wizards-newContentElement-wizardItems-group-elements-name
:type: array
:Path: mod.wizards.newContentElement.wizardItems.[group].elements.[name]

mod.wizards.newContentElement.wizardItems.[group].elements
(array) List of items in the group.
Configuration for a single item.

mod.wizards.newContentElement.wizardItems.[group].elements.[name]
(array) Configuration for a single item.
.. confval:: iconIdentifier
:name: mod-wizards-newContentElement-wizardItems-group-elements-name-iconIdentifier
:type: string
:Path: mod.wizards.newContentElement.wizardItems.[group].elements.[name].iconIdentifier

mod.wizards.newContentElement.wizardItems.[group].elements.[name].iconIdentifier
(string) The icon identifier of the icon you want to display.
The icon identifier of the icon you want to display.

mod.wizards.newContentElement.wizardItems.[group].elements.[name].iconOverlay
(string) The icon identifier of the overlay icon you want to use.
.. confval:: iconOverlay
:name: mod-wizards-newContentElement-wizardItems-group-elements-name-iconOverlay
:type: string
:Path: mod.wizards.newContentElement.wizardItems.[group].elements.[name].iconOverlay

mod.wizards.newContentElement.wizardItems.[group].elements.[name].title
(localized string) Name of the item.
The icon identifier of the overlay icon you want to use.

mod.wizards.newContentElement.wizardItems.[group].elements.[name].description
(localized string) Description text for the item.
.. confval:: title
:name: mod-wizards-newContentElement-wizardItems-group-elements-name-title
:type: string | localized string
:Path: mod.wizards.newContentElement.wizardItems.[group].elements.[name].title

mod.wizards.newContentElement.wizardItems.[group].elements.[name].tt_content_defValues
(array) Default values for tt_content fields.
Name of the item.

mod.wizards.newContentElement.wizardItems.[group].elements.[name].saveAndClose
(boolean) If `true`, directs the user back to the :guilabel:`Page` module directly instead of showing the FormEngine. Default `false`.
.. confval:: description
:name: mod-wizards-newContentElement-wizardItems-group-elements-name-description
:type: string | localized string
:Path: mod.wizards.newContentElement.wizardItems.[group].elements.[name].description

Description text for the item.

.. confval:: tt_content_defValues
:name: mod-wizards-newContentElement-wizardItems-group-elements-name-tt_content_defValues
:type: array
:Path: mod.wizards.newContentElement.wizardItems.[group].elements.[name].tt_content_defValues

Default values for tt_content fields.

.. confval:: saveAndClose
:name: mod-wizards-newContentElement-wizardItems-group-elements-name-saveAndClose
:type: bool
:Path: mod.wizards.newContentElement.wizardItems.[group].elements.[name].saveAndClose
:Default: `false`

If `true`, directs the user back to the :guilabel:`Page` module
directly instead of showing the FormEngine.

.. _pageexample1:

Example: Add a new element to the "common" group
------------------------------------------------

.. code-block:: typoscript
.. literalinclude:: _newContentElementWizard.tsconfig
:language: typoscript
:caption: EXT:site_package/Configuration/page.tsconfig

# Add a new element (header) to the "common" group
mod.wizards.newContentElement.wizardItems.common.elements.header {
iconIdentifier = content-header
title = Header
description = Adds a header element only
tt_content_defValues {
CType = header
}
}
mod.wizards.newContentElement.wizardItems.common.show := addToList(header)
.. _pageexample2:

Example: Create a new group and add an element to it
----------------------------------------------------

.. code-block:: typoscript
.. literalinclude:: _newContentElementWizardGroup.tsconfig
:language: typoscript
:caption: EXT:site_package/Configuration/page.tsconfig

# Create a new group and add a (pre-filled) element to it
mod.wizards.newContentElement.wizardItems.myGroup {
header = LLL:EXT:cms/layout/locallang.xlf:advancedFunctions
elements.customText {
iconIdentifier = content-text
title = Introductory text for national startpage
description = Use this element for all national startpages
tt_content_defValues {
CType = text
bodytext (
<h2>Section Header</h2>
<p class="bodytext">Lorem ipsum dolor sit amet, consectetur, sadipisci velit ...</p>
)
header = Section Header
header_layout = 100
}
}
}
mod.wizards.newContentElement.wizardItems.myGroup.show = customText
With the second example, the bottom of the new content element wizard shows:

.. figure:: /Images/ManualScreenshots/List/PageTsModWizardsNewContentElementExample2.png
:alt: Added entry in the new content element wizard

Added entry in the new content element wizard


.. index::
Wizards; record
New Record wizard; order
Expand Down
10 changes: 10 additions & 0 deletions Documentation/PageTsconfig/Mod/_newContentElementWizard.tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Add a new element (header) to the "common" group
mod.wizards.newContentElement.wizardItems.common.elements.header {
iconIdentifier = content-header
title = Header
description = Adds a header element only
tt_content_defValues {
CType = header
}
}
mod.wizards.newContentElement.wizardItems.common.show := addToList(header)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Create a new group and add a (pre-filled) element to it
mod.wizards.newContentElement.wizardItems.myGroup {
header = LLL:EXT:cms/layout/locallang.xlf:advancedFunctions
elements.customText {
iconIdentifier = content-text
title = Introductory text for national startpage
description = Use this element for all national startpages
tt_content_defValues {
CType = text
bodytext (
<h2>Section Header</h2>
<p class="bodytext">Lorem ipsum dolor sit amet, consectetur, sadipisci velit ...</p>
)
header = Section Header
header_layout = 100
}
}
}
mod.wizards.newContentElement.wizardItems.myGroup.show = customText

0 comments on commit 56c2822

Please sign in to comment.