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 four content elements, so it ships four component sets and one aggregate set that depends on all of them.
All four content elements 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 Partners List content element. |
fgtclb/ | The Partners Map content element. |
fgtclb/ | The Partnerships List content element. |
fgtclb/ | The Partnerships Teaser content element. |
fgtclb/ | Everything above. This is the set to use unless you deliberately want a subset, and it is the name this extension published before the sets were cut per component — a site configuration that depends on it needs no change. |
Every content element set depends on fgtclb/, the set
of EXT:academic_base that labels the content element group all
academic extensions sort their elements into.
What the sets do not control
The page type Academic partner (doktype 40) and its backend layout AcademicPartner are not part of any set, and enabling or not enabling a set never changes them.
That is deliberate, not an oversight. Both are values stored on
pages
records: a page carries doktype = 40 and backend_
long before any site configuration is read. Were they delivered by an opt-in
set, every page tree on a site that does not use that set would show
[ MISSING LABEL ] for the layout, the layout could not be picked for
a new page, and the page type would disappear from the page tree wizard.
They are therefore registered installation-wide — the page type in TCA
(Configuration/TCA/Overrides/pages.php), the backend layout in the
always-included Configuration/page.tsconfig — and stay available on every
site of the installation.
What a set does deliver for that page type is its frontend rendering: the
page
object that picks the Fluid template of the page type is part
of the shared TypoScript block, so a site that includes no set of this extension
renders such a page with whatever its own site package defines.
The content of a partner page
A partner page renders the content elements of its main column
(
col) below the partner data, in their manual order and in
the language of the page. Any set of this extension, or the static template of
the shared block, delivers that, and no other set is needed for it.
The content is the variable
partner of the page object,
defined inside the condition on the partner page type, so it exists on partner
pages only. It is a
CONTENT
object that renders the records
through the
tt_ object of the site, and it works for a
FLUIDTEMPLATE
and a
PAGEVIEW
page object alike.
To render another column, or to slide the content from the parent pages, change the variable inside the same condition:
[page && traverse(page, "doktype") == 40]
page.10.variables.partnerContent {
select.where = {#colPos}=1
}
[END]
A page template of your own renders it as
{partner.
Changed in version 3.0
Up to 2.x the page template rendered the global object
styles., which only the set
fgtclb/ defined for the whole site. The set
and its static template are removed, see
Breaking: Partner pages render their content without a global path.
The layout of a partner page
A partner page renders inside the page layout of the site package, the way the
other pages of the site do: the page template declares a layout and fills its
section
Main
. The layout is Default unless a setting names
another one, which is what
bk2k/bootstrap-package
and most site
packages provide.
| Site setting / constant | Default | Meaning |
|---|---|---|
plugin. | Default | The Fluid layout of the site package the partner page renders its
section
Main
into. An empty value is read as Default. |
It is a site setting of the aggregate set fgtclb/, and a
constant of the same name for a site on the static templates. A site that
depends on a component set alone gets the default, but the site settings editor
does not offer the setting there. Depend on the aggregate set to configure it.
The page template reaches it as the variable
partner of
the page object, so it works on a
FLUIDTEMPLATE
and a
PAGEVIEW
page object alike.
A site package without a layout Default gets the fallback layout of this
extension, which renders the section
Main
and nothing else: the page
renders without the header, navigation and footer of the site, as it did up to
2.x, rather than failing. A layout Default of the site package wins over
it. The fallback exists for Default only: a layout the setting names
has to exist in the site package, or the partner page fails as any page with a
missing Fluid layout does.
The parts of a partner page
The section
Main
renders five partials, each of which can be replaced
on its own:
| Partial | Renders |
|---|---|
Partner/ | The title of the partner and the subtitle of the page, in one element with the class academic-. |
Partner/ | The first image of the page, through the shared image partial of EXT:academic_base. |
Partner/ | The categories assigned to the page, grouped by category type. |
Partner/ | The address of the partner. |
Partner/ | The content elements, the variable
partner
described above. |
Every partial receives all variables of the page:
{partner}
,
{map,
{images}
,
{partner,
{page and those of the
site package's page object.
{page is the record of the page on
both page object types,
{data}
of a
FLUIDTEMPLATE
page
object and
{page. of a
PAGEVIEW
one. The
subtitle is its field
{page.
The templates and partials of the page type are registered at the key 50 of
the page object. Register a directory of your own with a higher key, and its
files win:
# FLUIDTEMPLATE: a directory holding Partner/Page/Header.html
page.10.partialRootPaths.75 = EXT:my_sitepackage/Resources/Private/Partials/
# PAGEVIEW: a directory holding Partials/Partner/Page/Header.html
page.10.paths.75 = EXT:my_sitepackage/Resources/Private/
A site package that registers its own paths above 50 needs no line at all -
a
PAGEVIEW
site package at
paths., for example:
a Partials/ of its own wins already. An override of
the whole Pages/ keeps working the same way, and
renders without a layout, as before.
Changed in version 3.0
Up to 2.x the page template declared no layout and rendered every part
inline, and its paths used the key 100. See
Breaking: Partner pages render inside the site layout.
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-partners
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 Partners: Partners List (academic_partners) | The TypoScript of the Partners List content element. |
| Academic Partners: Partners Map (academic_partners) | The same for Partners Map. |
| Academic Partners: Partnerships List (academic_partners) | The same for Partnerships List. |
| Academic Partners: Partnerships Teaser (academic_partners) | The same for Partnerships Teaser. |
| Academic Partners: All components (academic_partners) | Every component this extension ships, in one entry. |
| Academic Partners: Shared plugin settings and page rendering (academic_partners) | The shared
plugin. block and the
page
object of the page type, on their own. This is
the entry an installation stored before the configuration was cut
per component, and it keeps working — but it does not make any
content element selectable, which the page TSconfig below does. |
Include static page TSconfig
Edit the page record of the site root, tab Resources, field Page TSconfig, and add the entry:
| Entry | Delivers |
|---|---|
| Academic Partners: Partners List (academic_partners) | Makes the Partners List content element selectable, and configures its entry in the new content element wizard. |
| Academic Partners: Partners Map (academic_partners) | The same for Partners Map. |
| Academic Partners: Partnerships List (academic_partners) | The same for Partnerships List. |
| Academic Partners: Partnerships Teaser (academic_partners) | The same for Partnerships Teaser. |
| Academic Partners: All components (academic_partners) | Every component this extension ships, in one entry. |
The setting is inherited by every page below the one it is set on.
Pagination of the partner list
The Partners List content element can split its partners into pages. Whether it does, and how many partners a page holds, is set on each content element, tab Pagination:
| Field | Default | Meaning |
|---|---|---|
| Enable pagination | off | Off, the list renders every partner the filter matches. |
| Results per page | 10 | The number of partners on one page. |
How many page numbers the navigation links at once is one value for the whole site:
| Site setting and constant | Default | Meaning |
|---|---|---|
plugin. | 5 | The most page numbers the navigation links around the current page.
Read with georgringer/ only; without it, the
core pagination links every page. |
The site setting is declared by the set fgtclb/, so the
site settings editor offers it to a site that depends on that set or on
fgtclb/. A site configured through static templates sets the
constant instead.
Every page link keeps the active filter and sorting, and a filter submission starts on page one. The Partners Map is never paginated.
The category filters
The filter form of the Partners List and the Partners
Map offers one select per category type of the group partners. Three settings
change which of them it offers and how, for the whole site:
| Site setting and constant | Default | Meaning |
|---|---|---|
plugin. | empty | The category types to offer, in this order, as a comma separated
list of type identifiers, for example sdg,region. Empty
offers every type that has a category, in the order of the
category types of the group. |
plugin. | 0 | How many filters the form shows right away. The others follow in a More filters section the visitor opens, which is open already while one of its filters has a value. 0 shows every filter. |
plugin. | 0 | Leaves out a category no listed partner carries, instead of offering it as a disabled option. A selected category is always offered. A filter whose categories are all left out still renders, with its "All" option only. |
plugin:
tx_academicpartners:
filter:
categoryTypes: 'sdg,region'
visibleCount: 1
hideDisabledOptions: true
The settings are site settings of the aggregate set fgtclb/
and constants of the same names for a site on static templates. A site that
depends on fgtclb/ or fgtclb/
alone gets the defaults, but the site settings editor does not offer the
settings there — both content elements read them, and a set declares settings
only for itself.
A type is offered only when at least one category of that type exists, and an identifier that is no type of the group is ignored. The settings decide what the form offers, not what the list accepts: a link that filters by a category of a type the form does not offer still filters the list.
The "All" option of a filter
The first option of each filter, the one that selects no category, reads the
label
sys_ of this extension, and
falls back to
sys_ ("All options") where a
type has none. The extension ships no label per type; a site adds them in
TypoScript, for every content element of the extension or for one plugin:
plugin.tx_academicpartners._LOCAL_LANG {
default.sys_category.partners.allOptions.region = All regions
de.sys_category.partners.allOptions.region = Alle Regionen
}
# Only in the partner map:
plugin.tx_academicpartners_map._LOCAL_LANG.default.sys_category.partners.allOptions.region = All regions
A language file override works as well, as for any label of this extension:
$GLOBALS on TYPO3 v13,
$GLOBALS on TYPO3 v14,
each pointing from
EXT:academic_partners/Resources/Private/Language/locallang.xlf to a file
of the site package.
Templates
The partial Partner/ renders the selects from the
variable
{filter:
{filter and
{filter hold the identifiers of the offered types, in their
order, before and behind More filters. Where that variable does not
reach the partial, in a template that renders the partial with arguments of its
own instead of
{_, it offers every type with a category, as before,
and the filter types and the visible count have no effect there. To use them,
pass
filter on in a template that renders the partial.
New in version 2.4
Up to 2.3 the form offered every type with a category, all of them right away and with one "All" label, and anything else needed an override of the partial.
Active filters, reset link and result count
Three switches add to the filter form of the Partners List and the Partners Map, for the whole site. All three are off by default.
| Site setting and constant | Default | Meaning |
|---|---|---|
plugin. | 0 | One tag per selected category, below the form. Each tag links to the list without that selection, every other selection and the sorting kept. |
plugin. | 0 | A Reset all filters link to the page without any list argument, so the list shows what the content element presets. Offered after the visitor selected something, while a category is selected or preset by the content element, also once the visitor removed the preset. On the page as the editor preset it, the link would lead to the page shown. |
plugin. | 0 | The number of partners found, for example "12 partners found". In a paginated list it counts every partner, not those of the page shown, and in the map the partners it draws. |
plugin:
tx_academicpartners:
filter:
showActiveFilters: true
showReset: true
showResultCount: true
The settings are site settings of the aggregate set fgtclb/ and constants of
the same names, like the filter settings above.
- A tag shows a category in the language of the page.
- A tag stays a tag when the editor preset its category: removing it shows the list without that category, and the reset link brings the preset back.
- Where the content element hides the filter, the visitor cannot change it, and neither tags nor the reset link are shown. The count is.
- Every selected category is a tag, also one whose type the form does not offer (see the filter types above), for example a preset one. Removing it works like for any other tag.
- The tags and the reset link come from the partial
Partner/, the count fromActive Filters. html Partner/. Both are rendered byResult Count. html Partner/, so a project that overrides that partial does not show them until it renders them as well. The partials use the classesSorting And Filters. html academic-(withpartners- active- filters __,tags __,tag __andremove __) andreset academic-, and bring no styles.partners- result- count - The reset link needs the variable
{visitor, which the list action assigns. A template that renders the partials with arguments of its own has to pass it on, or the list offers no reset link.Selection} - The labels are
filter.,active Filters. label filter.,active Filters. remove filter.,reset list.andresult Count. singular list.of this extension. The count labels take the number asresult Count. plural %d, the remove label the category title as%s.
New in version 3.0
The three settings and the two partials.
The partner map
The Partners Map content element draws its partners on a map, with the tiles of OpenStreetMap by default. Where the map is centred, how far it zooms and where its tiles come from is one configuration for the whole site:
| Site setting and constant | Default | Meaning |
|---|---|---|
plugin. | 51.1657 | The latitude the map is centred on while it shows no partner, from -90 to 90, with a decimal point. |
plugin. | 10.4515 | The longitude of that centre, from -180 to 180, with a decimal point. |
plugin. | 6 | The zoom level while the map shows no partner. 0 shows the whole world. |
plugin. | 18 | How far the map zooms in at most. A map with partners fits itself around them, and around a single partner it zooms in up to this level. Lower it to keep the surroundings of that partner in view. |
plugin. | 50 | The space in pixels between the edge of the map and the outermost partners. |
plugin. | https:// | The URL template the map loads its tiles from, with the placeholders
{z}, {x} and {y}, and {s} for a subdomain. |
plugin. | the attribution the map always showed, which credits OpenStreetMap | The attribution the map shows for its tiles. It is HTML, and the map renders it as HTML. |
plugin:
tx_academicpartners:
map:
centerLatitude: 47.5162
centerLongitude: 14.5501
zoom: 7
maxZoom: 14
The settings are site settings of the set fgtclb/, so the
site settings editor offers them to a site that depends on that set or on
fgtclb/. A site configured through static templates sets the
constants instead.
The defaults are the values the map used before they could be configured, and the map falls back to them for every value it cannot use: an empty value, a number that is not a number or lies outside its range. The centre is one value, so a latitude it cannot use discards the longitude as well. An empty tile URL or attribution uses the default, because a tile server's terms usually require an attribution. Whether the tile server delivers tiles up to the maximum zoom, and what its attribution has to say, is up to the site.
Which partners the map draws
The map draws the partners the filter matches that have coordinates and whose page has Show on map switched on, the switch next to the coordinates of the partner page. The switch is on for a new partner. It is about the map only: the partner list lists a partner hidden from the map.
The map reads the switch of the partner page in the language it is rendered in. The switch of a translation follows its default record, as the coordinates do, so switching a partner off in the default language takes it off the map in every language. An editor who detaches the switch of a translation sets it for that language on its own.
The width of the map
Each Partners Map content element has a tab Layout with the field Map width:
| Option | Renders |
|---|---|
| Content width, the default |
<div class="academic-, as before. |
| Full width |
<div class="academic- |
The extension ships no style for the class. What full width means depends on the page layout of the site, so the theme of the site styles it. A content element saved before the field existed renders at content width.
The files the map loads
The map is drawn with Leaflet and its marker cluster plugin, both built from
their npm packages into
Resources/:
| Library | Version | Module | Stylesheets |
|---|---|---|---|
| Leaflet | 1.9.4 | leaflet | leaflet. |
| Leaflet.markercluster | 1.5.3 | leaflet. | Marker, Marker |
The import map of the extension publishes the modules under those names, and the
map module imports them. No global variable is set. The partial
Partner/ registers the stylesheets,
Css/, which sizes the map and keeps a site's image rules
off its tiles and markers. The partial names the marker icon of this extension,
in Resources/, in the attribute
data- of the map element, and the markers load
their images from that directory. Without the attribute they show the icon of
Leaflet.
Another extension or the theme that maps leaflet as well shares the map's
import map entry: the page loads one of the two Leaflets for every module.
The map on other pages
The map is rendered by the partial Partner/, and a template of
the site package can render it too. It takes these arguments:
| Argument | Meaning |
|---|---|
partners
| The partners to draw. |
partner
| A single partner instead. The partial renders nothing when the partner has no coordinates. |
map
| The map settings above. Without them the map uses the defaults. |
The page of the page type Academic partner does not show a map, but
its template and its partials have everything a map for the partner of the page
needs:
{partner}
, and the map settings of the site as
{map.
The data processor partner- adds both, for a
FLUIDTEMPLATE
and for a
PAGEVIEW
page object. It takes the settings from the
site settings and the constants, not from
plugin., so a value a site sets in
the TypoScript setup of the plugin reaches the content element only. A site
package that shows the location of the partner below the address overrides the
partial Partner/, see The parts of a partner page,
and renders in it:
<f:render partial="Partner/Map" arguments="{partner: partner, map: mapSettings}" />
A single partner is where the maximum zoom matters most: the map zooms in on the partner up to that level.
The partial draws one map per page. Its element ids are fixed, so on a page that renders it twice, the content element on a partner page that shows a map for example, only the first map is drawn and the second stays empty.
The settings reach the map as data attributes of the element
<div id="map">
, which the partial renders:
| Attribute | Setting |
|---|---|
data- |
center |
data- |
center |
data- |
zoom
|
data- |
max |
data- |
padding
|
data- |
tile |
data- |
attribution
|
data- | none, the partial writes the URL of the marker icon of this extension |
An attribute that is missing, empty or out of range uses the default, and the two coordinates are used only together.
A project that overrides Templates/ keeps its template.
It renders the map without these attributes, so its map uses the defaults until
it renders the partial or adds the attributes to its own map element. A project
that already ships a partial Partner/ of its own overrides the
shipped one. It is rendered with
partners
and
map
.
The header of the content elements
The header and the subheader an editor enters on a Partners List, Partners Map, Partnerships List or Partnerships Teaser 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_academicpartners.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.
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. For this extension that
is the
plugin. constants block: the three Fluid
root paths, the number of page links of the
pagination, the settings of
the category filters and of
the partner map, and the
content element header switch.
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 partner pages 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.