.. index:: Configuration; Sections .. _configuration-sections: ================ Profile sections ================ :file:`Configuration/AcademicPersons/Settings.yaml` describes a profile in six top-level maps. It ships with :guilabel:`academic_persons`, which owns the records and their TCA, and it is the one file the backend record editor, the public detail view and the editing frontend of `EXT:academic_persons_edit `__ read. .. list-table:: :header-rows: 1 * - Map - Describes * - :yaml:`profile` - The public detail layout (:yaml:`structure` and :yaml:`details`), and every directly editable profile property with its section, control and validators. * - :yaml:`special` - The components of the editing frontend that are not one property: the composed display name, the image and the synchronisation switch. * - :yaml:`contracts` - The contract fields, and the address, email and phone sections a contract owns. * - :yaml:`documentSections` - The sortable lists attached to a profile: the seven timeline entry types and the contracts. * - :yaml:`frontendUserSync` - Which :sql:`fe_users` column feeds which property when profiles are synchronised from frontend users, see :ref:`configuration-frontend-user-sync`. * - :yaml:`managedFields` - Which fields are read-only in the backend on the records a synchronisation wrote, see :ref:`configuration-managed-fields`. The order of every map and list is preserved and is what the editing frontend renders. The :ref:`validator flags ` are documented on their own page. .. attention:: The syntax of this file is still considered experimental and may change in a future release. .. _configuration-sections-profile: The profile map =============== Two keys describe the public layout, everything else is a field: .. code-block:: yaml profile: structure: left: - menuSections right: - headline - position - profileImage - contact - subline - profileEntries - menuSectionsDatas details: headline: - title - firstName - middleName - lastName subline: 'LLL:EXT:academic_persons/Resources/Private/Language/locallang.xlf:detail.subline' gender: section: information fieldType: select renderType: select validators: - required firstName: section: information fieldType: input renderType: text validators: - readonly - disabled helptext: 'LLL:EXT:academic_persons/Resources/Private/Language/locallang.xlf:helptext.firstName' miscellaneous: section: aboutme fieldType: textarea renderType: ckeditor characterLimit: 1000 validators: - html :yaml:`structure` The layout columns and the ordered elements in each column. The shipped detail template renders ``left`` as the desktop navigation and ``right`` as the main content; on mobile, the ``left`` elements are inserted again directly before ``subline``. :yaml:`details` Per element, the ordered profile properties, the relation map, the label reference or the special renderer it renders. Supported elements are :yaml:`menuSections`, :yaml:`headline`, :yaml:`position`, :yaml:`profileImage`, :yaml:`contact`, :yaml:`subline`, :yaml:`profileEntries` and :yaml:`menuSectionsDatas`; an unknown element renders nothing. :yaml:`position` and :yaml:`contact` take the special renderer :yaml:`special: datasFromContracts`, and choose their contracts with :yaml:`contracts` and :yaml:`onlyValid` - see :ref:`configuration-sections-profile-contracts`. :yaml:`position` also lists what its line shows, see :ref:`configuration-sections-profile-position-fields`. :yaml:`menuSections` lists stable navigation identifiers and :yaml:`menuSectionsDatas` maps each of them to the profile relation it shows. .. _configuration-sections-profile-contracts: The contracts of the position and contact blocks ------------------------------------------------ A block rendered with :yaml:`special: datasFromContracts` chooses which of the profile's contracts it renders. The shipped file states the defaults: .. code-block:: yaml profile: details: position: special: datasFromContracts contracts: all onlyValid: false fields: - position contact: special: datasFromContracts contracts: all onlyValid: false :yaml:`contracts` ``all`` renders every contract, ``first`` only the first in the editor's order that :yaml:`onlyValid` leaves. Anything else is ``all``. :yaml:`onlyValid` ``true`` leaves out the contracts that have ended or not started yet, and limits the page cache lifetime as described in :ref:`configuration-contract-display-cache`. A boolean, or a value PHP reads as one (``1``, ``'true'``, ``'yes'``, ``'on'``); anything else is ``false``. The two blocks are configured one by one, so a profile page may list every position and the contact data of the first contract only. The unit and function type filter of the list elements has no counterpart here: the detail view shows one profile, not a restricted list. See :ref:`configuration-contract-display` for how the options of the content elements relate. .. _configuration-sections-profile-position-fields: What the position line shows ---------------------------- :yaml:`profile.details.position.fields` lists what the position line shows of each contract, in this order. Three values are accepted: :yaml:`position` The position text of the contract. :yaml:`functionType` The name of the contract's function type. A profile with the gender ``ms`` gets the female name and one with ``mr`` the male name, where the function type has one. Every other profile, and a function type without the gendered name, gets the general name. :yaml:`organisationalUnit` The display text of the contract's organisational unit, or its unit name where the display text is empty. The shipped value is :yaml:`[position]`, the line as it was before the key existed. Other values are dropped, and a list that keeps none of the three is the shipped value. A contract that has none of the listed values gets no line. Settings files merge key by key, so a site package that wants the function type next to the position states only the list: .. code-block:: yaml :caption: EXT:my_sitepackage/Configuration/AcademicPersons/Settings.yaml profile: details: position: fields: - position - functionType Each value is rendered in an element of its own, an ``ace-value`` with the class of its field: ``ace-position``, ``ace-function-type`` or ``ace-organisational-unit``. The values of one contract share one line, ``ace-attribute ace-position-line``. The stylesheet of the site separates them, the example of :ref:`configuration-sections-profile-rendering` with a comma. .. _configuration-sections-profile-rendering: How the layout is rendered -------------------------- The shipped :file:`Resources/Private/Templates/Profile/Detail.html` receives the two keys as ``publicProfile`` and dispatches every identifier of :yaml:`structure` to a partial of the same name below :file:`Resources/Private/Partials/Profile/PublicProfile/`: .. list-table:: :header-rows: 1 * - Element - :yaml:`details` entry - Renders * - :yaml:`menuSections` - Ordered navigation identifiers - One link per identifier whose relation has records * - :yaml:`headline` - Ordered profile properties - The non-empty ones as the parts of the heading * - :yaml:`position` - :yaml:`special: datasFromContracts` - The values :yaml:`fields` lists of every contract :yaml:`contracts` and :yaml:`onlyValid` select * - :yaml:`profileImage` - Ordered image properties - Every non-empty one, in an ``ace-profile-image`` * - :yaml:`contact` - :yaml:`special: datasFromContracts` - Email addresses, phone numbers, postal addresses, location with room, and office hours of every contract :yaml:`contracts` and :yaml:`onlyValid` select, see :ref:`configuration-sections-profile-office-hours` * - :yaml:`subline` - An ``LLL:EXT:`` reference - The translated heading, and the point before which the :yaml:`left` elements are repeated below the large breakpoint * - :yaml:`profileEntries` - Ordered rich text properties - The non-empty ones as fold-out entries * - :yaml:`links` - Ordered link properties - The non-empty ones, each with its companion title property (:yaml:`website` with ``websiteTitle``) as the link text * - :yaml:`menuSectionsDatas` - Navigation identifier to relation map - One timeline section per identifier whose relation has records Overriding a partial changes how an element renders, overriding :yaml:`profile` changes what renders and where. The years of a timeline entry are printed as they are stored - a single year, a range, or an open range prefixed with a "since" or "till" label - and nothing about them is locale dependent. Below the large breakpoint the elements of the :yaml:`left` column are rendered a second time, directly before the :yaml:`subline` element of the :yaml:`right` column. A layout without :yaml:`subline` in :yaml:`right` therefore has no mobile navigation. The view is a content element and renders no ``
``, no ``