:navigation-title: Configuration .. _configuration: ============= Configuration ============= This extension ships its frontend TypoScript and its backend page TSconfig in two forms: as TYPO3 **site sets**, and as classic **static templates** plus **page TSconfig files** that are selected on a page. Both forms read the very same files, so they configure an installation identically. Pick one of them per site and stay with it — see :ref:`Do not combine both ` for what happens otherwise. .. _configuration-components: What the sets contain ===================== The extension ships the ProfileEditing component and one aggregate set that keeps the stable extension-level set name. .. list-table:: :header-rows: 1 * - Set - Delivers * - `fgtclb/academic-persons-edit-profile-editing` - The assigned-profile list, profile editor, AJAX page type and the page TSconfig that offers ProfileEditing in the backend. * - `fgtclb/academic-persons-edit` - ProfileEditing under the stable aggregate name. This is the normal set to use. Both depend on `fgtclb/academic-base-ctype-group`, the set of :guilabel:`EXT:academic_base` that labels the content element group all academic extensions sort their elements into. The plugin renders partials of :guilabel:`EXT:academic_persons`, but it reads them from :file:`Resources/`, not from that extension's TypoScript. There is therefore no set dependency on any `fgtclb/academic-persons-…` set, and none is needed. .. _configuration-hidden-by-default: The content element is hidden by default ======================================== :guilabel:`EXT:academic_persons_edit` hides the editing content type for the whole installation and brings ProfileEditing back per component. Whichever of the two mechanisms below you use, ProfileEditing is the only profile-editing content element offered in the backend. .. _site-set: Include the site set ==================== Add the set to the :file:`config.yaml` of the site that should offer the content element: .. code-block:: diff :caption: config/sites/my-site/config.yaml (diff) base: 'https://example.com/' rootPageId: 1 +dependencies: + - fgtclb/academic-persons-edit See also `TYPO3 Explained, Using a site set as dependency in a site `__. The :guilabel:`View` action in the assigned-profile list uses the same public detail page as the Academic Persons list plugins. Configure ``plugin.tx_academicpersons.detailPid`` in the Academic Persons site settings or TypoScript constants. ProfileEditing copies that value into its own Extbase settings and targets the ``academicpersons_detail`` content element; it does not require a second page setting in Academic Persons Edit. .. _static-templates: Include static templates ======================== For an installation that still configures its frontend through :sql:`sys_template` records, the same files are registered as static templates and as selectable page TSconfig files. .. tip:: On TYPO3 v13 and v14 we recommend the site set — and if you use it, do not press the backend button :guilabel:`Create a root TypoScript record` on that site. The :sql:`sys_template` record it creates carries the flag :guilabel:`Clear` for constants and setup, and that flag discards everything the site sets contributed. An installation that is already in that state gets its configuration back by selecting the static templates below in that very record. .. _static-typoscript: Include static TypoScript ------------------------- Edit the :sql:`sys_template` record of the site root and add the entry to :guilabel:`Include static (from extensions)`: .. list-table:: :header-rows: 1 * - Entry - Delivers * - :guilabel:`Academic Persons Edit: Profile editing (academic_persons_edit)` - The TypoScript and AJAX page type of ProfileEditing. * - :guilabel:`Academic Persons Edit: All components (academic_persons_edit)` - Every component this extension ships, in one entry. * - :guilabel:`Academic Persons Edit: Path up to 2.3 (deprecated, use All components) (academic_persons_edit)` - The same as :guilabel:`All components`, for a record that still stores the path of version 2.3. Deprecated, removed in version 4.0, see :ref:`deprecation-legacy-static-template-path`. .. _static-pagetsconfig: Include static page TSconfig ---------------------------- Edit the page record of the site root, tab :guilabel:`Resources`, field :guilabel:`Page TSconfig`, and add the entry: .. list-table:: :header-rows: 1 * - Entry - Delivers * - :guilabel:`Academic Persons Edit: Profile editing (academic_persons_edit)` - Makes ProfileEditing selectable and configures its wizard entry. * - :guilabel:`Academic Persons Edit: All components (academic_persons_edit)` - Every component this extension ships, in one entry. The setting is inherited by every page below the one it is set on. .. _configuration-javascript: Load the script or bring your own ================================= The :guilabel:`Profile editing` content element loads the module :js:`@fgtclb/academic-persons-edit/frontend/profile.js` on the page that shows the editor of a profile. The list of assigned profiles loads no script. It is switched off per site, for an installation that brings an editor of its own: .. list-table:: :header-rows: 1 * - Site setting and constant - Default - Off means * - :yaml:`plugin.tx_academicpersonsedit.assets.js` - :yaml:`true` - The page does not load the module. With the site set, it is a site setting of the component set `fgtclb/academic-persons-edit-profile-editing`, so a site that names only that set can set it: .. code-block:: yaml :caption: config/sites/my-site/settings.yaml plugin.tx_academicpersonsedit.assets.js: false With the static template, it is the TypoScript constant of the same name: .. code-block:: typoscript :caption: Constants of the root sys_template record plugin.tx_academicpersonsedit.assets.js = 0 **The editor does not work without its script.** Every field, button and dialog of it is driven by the script: it defines the custom element :html:`` and the elements below it, reads their configuration from the :html:`data-*` attributes and sends every change to the endpoints the template names. Switching the script off therefore means bringing a complete editor for the same markup and the same endpoints, see :ref:`Templates `. A site that only wants to change how the editor looks keeps the script, styles the editor in its site package and overrides partials where the markup has to change. .. _one-mechanism-per-site: Do not combine both =================== A site that uses the site set **and** the static template reads the shipped files twice. The site set is applied before the :sql:`sys_template` record, so the second read happens after the site settings and after :file:`config/sites//constants.typoscript` — and it resets every constant the extension ships a default for back to that default. Nothing else is damaged: the :guilabel:`Constants` and :guilabel:`Setup` fields of the :sql:`sys_template` record, the page TSconfig of a page and the page TSconfig files selected on a page are all applied afterwards and still win. Use one mechanism per site and the question does not arise. .. toctree:: :maxdepth: 5 :titlesonly: General/Index Settings/Index Labels/Index