Einzelnen Beitrag anzeigen
  #6  
Alt 14.09.06, 10:50
droom droom ist offline
Forum Newbie
 
Registriert seit: 05.05.06
Beiträge: 36

Also im Setup haste so was:
-----------------------------
Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
###Setting Template Mode: 0=accessible_divs / 1=classic_tables

templateMode = 0

page.CSS_inlineStyle (

BODY {
        font-size : {$mainFontSize};

}
P, OL, UL, DIV{
                font-size : {$mainFontSize};
}
h1{
                font-size: {$headerh1FontSize};
}

h2,H2{
                font-size: {$headerh2FontSize};
}

)

config.linkVars = style #(wenn schon L, dann musste dies nur dazu fügen)
----------------------------

und in Constant, definierst du die ganzen Variablen. Hier haben wir 4 verschiedenen Schriftgrössen:
-------------------------
Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
###Dynamic fontsizes:
mainFontSize = 12px
headerh1FontSize = 16px
headerh2FontSize = 12px
[globalVar = GP:style = a]
mainFontSize = 10px
headerh1FontSize = 14px
headerh2FontSize = 10px
[global]
[globalVar = GP:style = b]
mainFontSize = 12px
headerh1FontSize = 16px
headerh2FontSize = 12px
[global]
[globalVar = GP:style = c]
mainFontSize = 18px
headerh1FontSize = 22px
headerh2FontSize = 18px
[global]
[globalVar = GP:style = d]
mainFontSize = 20px
headerh1FontSize = 24px
headerh2FontSize = 20px
[global]
---------------------------------

et voilà!

nun musste nur deine Links generieren:
HTML-Code:
<a href="http://domain/index.php?id=xx&style=a">Kleiner Schrift</a> <a href="http://domain/index.php?id=xx&style=b">Mittlerer Schrift</a> <a href="http://domain/index.php?id=xx&style=c">Grosser Schrift</a> <a href="http://domain/index.php?id=xx&style=d">Sehr grosser Schrift</a>
ACHTUNG: Damit es funktionniert, musste natürlich keine feste size-Angabe in deinem CSS-Datei sonst hat diese ne höhere Priorität und das ganze geht nicht.

Geändert von Junior (12.10.06 um 15:30 Uhr).
Mit Zitat antworten