---
title: "Feature: The script of the partner map can be switched off"
manual: "Academic Partners"
version: "main"
permalink: "https://docs.typo3.org/permalink/fgtclb/academic-partners:feature-1791566502@main"
source: "Changelog/3.0/Feature-JavaScriptSwitch.rst"
rendered: "2026-10-26T19:20:19+00:00"
---

# Feature: The script of the partner map can be switched off {#feature-1791566502}

## Description {#description}

The partial `Partner/Map.html` registers the module
`@fgtclb/academic-partners/frontend/map.js` and the stylesheets of the map
libraries it imports, Leaflet and Leaflet.markercluster. An installation that
draws the map with a script of its own had to override the partial to leave
them out.

The module and the stylesheets of the libraries are switchable now, together,
per site:

| Site setting and constant | Default |
| --- | --- |
| `plugin.tx_academicpartners.assets.js` | `true` |

It is declared by the site set `fgtclb/academic-partners-map`, next to the other
settings of the map:

**config/sites/my-site/settings.yaml**

```yaml
plugin.tx_academicpartners.assets.js: false
```

An installation that configures its frontend through `sys_template`
records sets the TypoScript constant of the very same name, in
**Constants**:

**Constants of the root sys_template record**

```typoscript
plugin.tx_academicpartners.assets.js = 0
```

Every academic extension that loads a script has this switch, named
`assets.js` below its own plugin namespace and switched on by
default, after the switch of the study plan content element.

## Impact {#impact}

Nothing changes for an installation that configures nothing: the map loads
its script and the stylesheets of the libraries exactly as before.

Switched off, the page loads neither, and the markup is unchanged: the map
element with its settings as data attributes, and the hidden list of the
partners. **The map stays empty** until a script of the site draws it from
them, see [Load the script or bring your own](https://docs.typo3.org/permalink/fgtclb/academic-partners:configuration-javascript@main).

The partial takes the switch as the new argument `assets`. The
**Partner Map** content element passes it, and the data processor
`partner-data` adds it to the page of the page type **Academic
partner** as `{mapAssets}`, next to `{mapSettings}`:

```html
<f:render partial="Partner/Map" arguments="{partner: partner, map: mapSettings, assets: mapAssets}" />
```

A page template that renders the partial without the argument loads the
script whatever the setting says, as it did before. A project that overrides
`Partials/Partner/Map.html` keeps whatever its copy loads.
