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 Do not combine both for what happens otherwise.
What the sets contain
This extension ships six content elements, so it ships six component sets and one aggregate set that depends on all of them.
All six are driven by one Extbase plugin, so they share one TypoScript block,
plugin.. That block is shipped once, in
Configuration/, and every component includes it.
Which component sets a site names therefore decides which content elements the
backend offers, not how much TypoScript is loaded.
| Set | Delivers |
|---|---|
fgtclb/ | The Person List content element. |
fgtclb/ | The Person List and Details content element. |
fgtclb/ | The Person Details content element. |
fgtclb/ | The Person Contact Card content element, and the FlexForm restriction that hides the list, sorting and pagination fields for it. |
fgtclb/ | The Selected Person’s Profiles content element. |
fgtclb/ | The Selected Person’s Contracts content element. |
fgtclb/ | Everything above. This is the set to use unless you deliberately want a subset. |
fgtclb/ | The name this extension published before the sets were cut per
component. It delivers exactly what fgtclb/
delivers, and is kept so that existing site configurations keep
working. |
fgtclb/ | Everything the aggregate delivers, plus a
page
object
that renders content on a plain Bootstrap page. Meant for an
installation without a site package of its own — an alternative to
fgtclb/, never an addition to it. |
Every component set depends on fgtclb/, the set of
EXT:academic_base that labels the content element group all academic
extensions sort their elements into.
The site settings of this extension are declared with the aggregate set: the
detail page, whether the names link to it, the default grouping, sorting and
pagination of a profile list, the selected letter of the letter navigation,
the crop variants and placeholders of the profile image, the phone link prefix
and the content element header
switch below. A site that depends on a single component set still gets the
shipped defaults, but can only override them in Site Settings when
it depends on fgtclb/.
Names without a detail link
The name of every profile in the list, card, selected profiles and selected contracts elements links to the profile's detail view: on the detail page the element or the site names, or on the page of the element when neither names one. A site without profile detail pages, an A to Z directory or contact cards only, shows the names as text instead:
-
- Type
- string
- Default
link
linklinks the names to the detail view,noneshows them as text, in the table view mode as well.The list-and-detail element always links its names, because it shows the detail view itself. A detail page a template passes to the item partial links as well, see Passing the detail page. The contact list of EXT:academic_contacts4pages follows the setting, it has no option of its own.
An element can choose otherwise with its option Link the names to the detail view, see Link the names to the detail view.
On a site that uses the site set, the setting is Link the names to
the detail view of fgtclb/. It is declared for the site set
and as a constant of the shared static template, with the same default in both.
link without a detail page keeps linking the names to the page of their
element, with the arguments of the detail view, because a site may place the
detail plugin on the page of its list.
The prefix of a phone link target
Every phone number this extension renders is a link, and the number is written
into its
tel:
target without the spaces it is stored with. An
installation that stores phone numbers as extensions only — the part that is
the same for every number left out — has no dialable target that way, and this
setting is what completes it.
-
- Type
- string
- Default
- empty
Prepended to the
tel:target of every phone number, in the list, card and selection elements, in the profile detail view and in the contacts of a page. The spaces of prefix and number alike are removed from the target. The visible link text is not touched: it keeps the number as it is stored, without the prefix.The prefix is applied unconditionally, so an installation that stores full numbers, or a mixture of full numbers and extensions, leaves it empty.
The setting is declared for the site set and as a constant of the shared static template, with the same default in both — see Do not combine both.
View modes
The list, list-and-detail, selected profiles and selected contracts elements render their profiles in a view mode, which the options View Mode Default and View Mode Toggle of the content element choose, see View Mode Default. Two settings decide which modes exist and what the table shows:
-
- Type
- string
- Default
list,table
The modes the elements may render, comma separated. Neither the default of a content element nor the request of a visitor renders a mode outside this list: such a default falls back to the tiles - or to the first allowed mode where the tiles are not allowed - and such a request to the default. A mode is a plain name, a lowercase letter followed by letters and digits; an entry of any other shape is ignored.
-
- Type
- string
- Default
name,position,emailAddresses,phone Numbers,room
The columns of the table, comma separated, in this order. The shipped columns are
name,position,organisational,Unit email,Addresses phoneandNumbers room. The name links to the detail view; the contract columns show the value of every contract the element shows for the profile, one per line.The fields of the content element (Show only selected Fields) apply to the table as they apply to the tiles: while the element names fields there, a contract column whose field it does not name -
contracts.forroom room- is left out. The name, and a column of your own, stay.
Both settings are declared for the site set and as constants of the shared static template, with the same default in both. A mode of your own is a partial and an entry in the allowed modes, see adding a view mode; its URL is described in the route enhancers.
Options of the content elements
The options an editor sets in a content element are described with the element, in For integrators. That is where these two topics moved:
- Filters for visitors of the list elements.
- Which contracts a profile shows, and how the page cache follows the validity of a contract.
Restrict the backend contract selects
Two backend fields let an editor pick a contract: the Contract of a page contact record of EXT:academic_contacts4pages, and Selected contracts of the Selected Person’s Contracts content element. Both offer every contract of the installation — in an installation with more than one site, that is every site's contracts, each labelled with a person's name.
Page TSconfig restricts a field to the pages the contracts of that page tree are stored on. Page TSconfig is inherited down the page tree, so each site configures its own folders on its root page.
The setting is opt-in, and without it nothing changes. Respecting the Extbase storage page instead is deliberately not done: a page tree without an explicitly configured storage page would get an empty select and no error.
-
- Type
- string, a comma-separated list of page uids
- Default
- empty
The pages a contract has to be stored on to be offered. Empty — the default — offers every contract of the installation.
-
- Type
- integer
- Default
0
How many levels below each listed page are included. The default
0uses the listed pages themselves. A hidden folder is included as well, because a storage folder is regularly hidden.
Set them on the page record of the site root, tab Resources, field Page TSconfig. The path of the FlexForm field is the longer one: it carries the data structure identifier and the sheet, and the dot in the element's name is escaped.
# The "Contract" field of a page contact record.
TCEFORM.tx_academiccontacts4pages_domain_model_contact.contract.itemsProcFunc {
storagePids = 42,84
recursive = 1
}
# The "Selected contracts" field of the content element.
TCEFORM.tt_content.pi_flexform.academicpersons_selectedcontracts.sDEF.settings\.selectedContracts.itemsProcFunc {
storagePids = 42,84
recursive = 1
}
A contract the record already references stays selectable even when it is stored outside the listed pages. Without that, opening and saving the record would drop the relation, because a select offers no other source for its value.
The restriction is applied before
\FGTCLB\ is
dispatched, so a listener of that event still has the last word.
The crop variants of the profile image
The image cropper of a profile image offers three crop variants. A template
requests one by its name, through the crop argument of
<f: or of the image partial of EXT:academic_base:
| Name | Aspect ratio |
|---|---|
default | Free, 16:9, 3:2, 4:3 and 1:1 |
square | 1:1 |
portrait | 3:4 |
default is the variant TYPO3 offers when a file field configures none, with
the same ratios, and the templates of this extension render it unless a site
chooses another one per view, see The crop variant of a view.
A crop an editor stored before the update is stored under that name and keeps
its meaning.
An image stores a crop for the new variants once an editor opens it in the
backend form and saves the record. Until then a template that requests square
or portrait renders the image uncropped. Where the image already has a crop
for default, the cropper starts square from that crop, fitted into its
ratio, and portrait from the whole image, fitted and centred; an image without
a crop starts both from the whole image.
A site that does not want a variant disables it in TCA, on this field only:
$GLOBALS['TCA']['tx_academicpersons_domain_model_profile']['columns']['image']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['portrait']['disabled'] = true;
Page TSconfig is not the way to do that.
TCEFORM. reaches every image below
the page it is set on, and on an image field that configures no variants of its
own it leaves the cropper with no variant at all, not even default.
A project that defines crop variants of its own for the profile image does so at the same path. A variant it sets by name replaces the one of the same name and leaves the others; assigning the whole array replaces all of them.
Crop variants a project configures on sys_ for every image are
merged with these on the profile image: the values of this extension win key by
key, and a ratio the project adds to a variant of the same name stays. A project
that restricted default to a fixed ratio that way therefore finds all the
ratios of the TYPO3 default offered on the profile image again, and the free
ratio preselected on an image without a crop.
The header of the content elements
The header and the subheader an editor enters on a Person List, Person Details, Person List and Details, Person Contact Card, Selected Person’s Profiles or Selected Person’s Contracts content element are rendered by the content element layout of the site, as for any other content element. The layouts of EXT:fluid_styled_content and of the bootstrap package do that, and the plugins render no header of their own.
A site whose content element layout renders no header, because its element templates render it instead, lets the plugins render it:
plugin.tx_academicpersons.renderContentElementHeader = 1
On a site that uses the site set, that is the site setting Render the
content element header in the plugins of fgtclb/. The
templates then render the header partial of EXT:fluid_styled_content
above their output, for every header layout except Hidden. Do not
switch it on where the layout renders the header: the header then appears twice.
The extension does not require EXT:fluid_styled_content. It adds the
partial path of that extension below every other one, so a site package that
ships a Header/ of its own renders that one instead, and a site
without EXT:fluid_styled_content provides the partial that way.
For the header layout Default, the partial takes the heading level
from
plugin., which
is mapped from the constant
styles. of
EXT:fluid_styled_content. A site that does not include the
TypoScript of EXT:fluid_styled_content sets the setting itself;
without it, such a header renders as an empty
<header>
element.
Include the site set
Add the set to the config. of the site that should offer the content
elements:
base: 'https://example.com/'
rootPageId: 1
+dependencies:
+ - fgtclb/academic-persons
See also TYPO3 Explained, Using a site set as dependency in a site.
Include static templates
For an installation that still configures its frontend through
sys_ 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 Create a root TypoScript record on that
site. The
sys_ record it creates carries the flag
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.
Include static TypoScript
Edit the
sys_ record of the site root and add the entry to
Include static (from extensions):
| Entry | Delivers |
|---|---|
| Academic Persons: All components (academic_persons) | Every component this extension ships, in one entry. This is the entry to use. |
| Academic Persons: Shared plugin settings (academic_persons) | The shared
plugin. block on its own.
This is what installations selected before version 2.4, then named
Academic Persons Settings. The stored value did not
change, so such a record keeps working untouched. |
| Academic Persons: Standalone page (academic_persons) | Everything All components delivers, plus the
page
object of the standalone flavour. Do not select
it on a site that has a site package of its own. |
There is one further entry per component — Academic Persons: Profile list, Academic Persons: Profile list and detail, Academic Persons: Profile detail, Academic Persons: Profile card, Academic Persons: Selected profiles and Academic Persons: Selected contracts. They exist so that the static mechanism has the same shape as the sets. Because all six components share one TypoScript block, each of them delivers the same thing, and selecting more than one of them changes nothing.
Include static page TSconfig
This is the half that decides which content elements the backend offers. Edit the page record of the site root, tab Resources, field Page TSconfig, and add the entries for the content elements the page tree should offer:
| Entry | Delivers |
|---|---|
| Academic Persons: All components (academic_persons) | Every component this extension ships, in one entry. |
| Academic Persons: Profile list (academic_persons) | Makes the Person List content element selectable, and configures its entry in the new content element wizard. |
| Academic Persons: Profile list and detail (academic_persons) | The same for Person List and Details. |
| Academic Persons: Profile detail (academic_persons) | The same for Person Details. |
| Academic Persons: Profile card (academic_persons) | The same for Person Contact Card, plus the FlexForm restriction of that element. |
| Academic Persons: Selected profiles (academic_persons) | The same for Selected Person’s Profiles. |
| Academic Persons: Selected contracts (academic_persons) | The same for Selected Person’s Contracts. |
The setting is inherited by every page below the one it is set on.
Load the script or bring your own
The Profile detail and the Profile list and detail
content elements load the module
@fgtclb/ on the page that shows a
profile. It opens and closes the entries of the profile, keeps the section
navigation below a sticky page header and marks the section in view when the
site loads Bootstrap. No list of this extension loads a script.
It is switched off per site, for an installation that brings its own:
| Site setting and constant | Default | Off means |
|---|---|---|
plugin. |
true
| The page does not load the module. |
With the site set, it is a site setting of fgtclb/, like every
other setting of this extension:
plugin.tx_academicpersons.assets.js: false
With the static template, it is the TypoScript constant of the same name:
plugin.tx_academicpersons.assets.js = 0
The profile does not work without a script. The markup stays exactly as it
is, and the entries of the profile are rendered folded: each panel carries the
attribute
hidden
, and only a script removes it. A script of your own
addresses the same markup, starting from the element
[data-:
- a button
[data-per entry, whoseacademic- persons- accordion- trigger] aria-names the panel it opens, and which has to setcontrols aria-and removeexpanded hiddenfrom that panel, [data-andacademic- persons- sticky- navigation] [data-, the section navigation, which works as plain anchor links without a script.academic- persons- scrollspy- navigation]
A project that overrides Templates/ keeps whatever
its copy loads, until it wraps its own
<f: in
<f:.
The switch is about the script of the profile only. A site that includes the
set fgtclb/ keeps loading the Bootstrap script
and stylesheet that its page object takes from a content delivery network,
whatever the switch says: that page object belongs to the page, not to the
plugin.
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
sys_ record, so
the second read happens after the site settings and after
config/ — and it resets every constant
the extension ships a default for back to that default.
Nothing else is damaged: the Constants and Setup fields
of the
sys_ 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.
Search, permissions and the wizard
The Integration chapter of academic_base covers what an installation runs beside the academic extensions: an index queue for the profiles of this extension with EXT:solr, the tables, fields and content types an editor group needs as a preset for b13/permission-sets, and how to move, rename or order the academic content elements in the new content element wizard.