Feature: The partner map is configurable per site
Description
Everything about the map of the Partner Map content element was fixed in its JavaScript: the centre over Germany, the zoom, how far it zooms in, the padding around the partners, the tile server and the attribution. A map with a single partner zoomed in to street level, and a site outside Germany or with a tile server of its own had to copy and rebuild the script.
- Seven site settings of the set
fgtclb/, and constants of the same names for the static template:academic- partners- map plugin.,tx_ academicpartners. map. center Latitude center,Longitude zoom,max,Zoom padding,tileandUrl attribution. Their defaults are the values the map used so far. - A tab Layout on the content element with the field
Map width. Full width adds the class
layout-to the element, for the theme to style. The extension ships no style for it.full Width -
The map moved from the plugin template into the partial
Partner/, which takes a list of partners or a single partner, and the map settings. The data processorMap. html partner-of the partner page adds the map settings asdata {map, so a page template can show the location of the partner of the page:Settings} <f:render partial="Partner/Map" arguments="{partner: partner, map: mapSettings, assets: mapAssets}" />Copied!The shipped page template does not render a map.
{mapis the switch of the map script, see Feature: The script of the partner map can be switched off.Assets}
See The partner map.
Impact
- A site that configures nothing sees the map it saw before.
- The settings reach the map as
data-attributes of the elementacademic- partners-* <div id="map">, listed in The partner map. A project that overridesTemplates/renders that element without them, so its map keeps the values it had until the project renders the partial or adds the attributes. A project that ships its ownPartner/ Map. html Partner/partial overrides the shipped one, and it is rendered with the argumentsMap. html partnersandmap. - The FlexForm of the map,
Configuration/, has two sheets now. The fields of the first one kept their sheetFlex Forms/ Map Settings. xml sand their names, so stored values and page TSconfig that addresses them keep working.DEF - A project that copied the map JavaScript only to change the centre, or added a field of its own for a full width map, can drop it with this update.