Wiki-Quellcode von Layoutumschaltung via URL

Version 24.2 von Carina Enke am 12.01.2024

Zeige letzte Bearbeiter
1 {{layout}}
2
3
4 {{layout-section ac:type="single"}}
5 {{layout-cell}}
6 Voraussetzung ist die vorhandene Konfiguration der Themes
7
8 Die URL-abhängigkeit der Themes wird in der "extendedContext.xml" konfiguriert.
9 Dazu muss der Bean (<bean id="themeModule" class="de.bps.olat.core.gui.themes.ThemeModule">) folgendes Element hinzugefügt werden:
10
11 {{code language="xml" title="Codeblock"}}
12 <property name="urlBasedThemes">
13 <map>
14 <entry key="www.eine-beispiel-url.de/lms-pfad" value-ref="bean_id_eines_vorhandenen_Themes" />
15 <entry key="www.eine-beispiel-url.de/lms-pfad" value-ref="Theme1" />
16 <entry key="www.eine-beispiel-url.de/lms-pfad" value-ref="Theme2" />
17 </map>
18 </property>
19 {{/code}}
20 {{/layout-cell}}
21 {{/layout-section}}
22 {{/layout}}
23
24
25
26
27 Precondition is the existing theme configuration.
28
29 The URL based dependence of themes is to be configured in the file "extendedContext.xml".
30 Therefore add the following element to the bean (<bean id="themeModule" class="de.bps.olat.core.gui.themes.ThemeModule">):
31
32 {{code language="xml" title="Codeblock"}}
33 <property name="urlBasedThemes">
34 <map>
35 <entry key="www.an-example-url.com/lms-path" value-ref="bean_id_of_an_existing_theme" />
36 <entry key="www.an-example-url.com/lms-path" value-ref="theme1" />
37 <entry key="www.an-example-url.com/lms-path" value-ref="theme2" />
38 </map>
39 </property>
40 {{/code}}