Feature: The study plan script can be switched off 

Description 

The study plan content element registers its script from inside its own template, with <f:asset.module> . An installation that brings a script of its own therefore had to override the whole template - and then shipped a copy of it that stopped following the original.

The script is switchable now, per site, without touching the template:

Setting Default Off means
plugin.tx_academicstudyplan.assets.js true The page does not load @fgtclb/academic-study-plan/frontend/academic-study-plan.js .

It is declared by the site set fgtclb/academic-study-plan-content-element , so every site that renders the element can set it:

config/sites/my-site/settings.yaml
plugin.tx_academicstudyplan.assets.js: false
Copied!

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
plugin.tx_academicstudyplan.assets.js = 0
Copied!

Impact 

Nothing changes for an installation that configures nothing: the script is loaded exactly as before, and only a page that carries the element loads it. The element brings no stylesheet, see Breaking: The study plan ships no stylesheet.

The markup is unchanged either way. Switching the script off does not reduce the element to what works without JavaScript - the filter, the semester accordion and the module dialogs need a script, and an installation that switches the shipped one off brings its own.

Affected Installations 

Every installation that renders the study plan content element. The defaults keep the script exactly as it was, so switching nothing off needs no action here.

An installation that overrode AcademicStudyPlan.html only to leave out the script can drop that override and set the switch instead - which also puts it back on the shipped script, with the keyboard handling and the dialog behaviour it has gained since the copy was taken.

Two cases the switch does not reach, both silent:

  • An installation that keeps its own copy of the template. The copy is rendered as it is, so its own f:asset line keeps loading unconditionally until it is wrapped in the same f:if .
  • A content object written by hand rather than copied from setup.typoscript. It assigns no settings.assets block, so the condition is false and the element loads no script. Copy the block, or assign the key.