Layoutumschaltung via URL

Version 25.5 von Carina Enke am 15.01.2024

Voraussetzung ist die vorhandene Konfiguration der Themes

Die URL-abhängigkeit der Themes wird in der "extendedContext.xml" konfiguriert.
Dazu muss der Bean (<bean id="themeModule" class="de.bps.olat.core.gui.themes.ThemeModule">) folgendes Element hinzugefügt werden:

Codeblock
<property name="urlBasedThemes">
<map>
 <entry key="www.eine-beispiel-url.de/lms-pfad" value-ref="bean_id_eines_vorhandenen_Themes" />
 <entry key="www.eine-beispiel-url.de/lms-pfad" value-ref="Theme1" />
 <entry key="www.eine-beispiel-url.de/lms-pfad" value-ref="Theme2" />
</map>
</property>

Precondition is the existing theme configuration.

The URL based dependence of themes is to be configured in the file "extendedContext.xml".
Therefore add the following element to the bean (<bean id="themeModule" class="de.bps.olat.core.gui.themes.ThemeModule">):

Codeblock
<property name="urlBasedThemes">
<map>
 <entry key="www.an-example-url.com/lms-path" value-ref="bean_id_of_an_existing_theme" />
 <entry key="www.an-example-url.com/lms-path" value-ref="theme1" />
 <entry key="www.an-example-url.com/lms-path" value-ref="theme2" />
</map>
</property>