Demonstration zum Inhaltselement Sourcecode. Diese Demo basiert auf der Erweiterung
jph_codesnippets unter Verwendung von FCE, CSS und TypoScript. Eine detailierte Beschreibung findet sich
hier
TypoScript Code
Zeilennummerierung
plugin.tx_jphcodesnippets_pi.lineNumbers >
plugin.tx_jphcodesnippets_pi.overallStyle = overflow: hidden
### Über Conditions setzen wir die Zeilennummern ###
#codeMode [on|off]
[globalVar = GP:codeMode = on]
plugin.tx_jphcodesnippets_pi.lineNumbers = numbers_normal
[end]
[globalVar = GP:codeMode = off]
plugin.tx_jphcodesnippets_pi.lineNumbers >
[end]
### CodeBox Elemente ###
/** Wir rendern erst das Content Element in ein eigenes DIV. (10)
* Dann erzeugen wir die Button und schreiben sie in ein DIV (20)
*/
lib.codeboxheader = COA
lib.codeboxheader {
10 = RECORDS
10 {
source.current = 1
tables = tt_content
select.orderBy = sorting
select.where = hidden = 0 and deleted = 0 and colPos = 0
wrap = <div class="codeTitle">|</div>
}
20 = COA
20 {
10 = TEXT
10.value = <div class="codeControls">
15 = TEXT
15.value = <div class="controlText">Zeilennummerierung</div>
20 = TEXT
20.typolink.parameter.data=TSFE:id
20.typolink.returnLast = url
20.wrap = <form action="|" target="_top" method="post" name="on" class="formOn">
30 = TEXT
30.value = <INPUT type="submit" name="An" value="An"><input type="hidden" name="codeMode" value="on"></form>
40 = TEXT
40.typolink.parameter.data=TSFE:id
40.typolink.returnLast = url
40.wrap = <form action="|" target="_top" method="post" name="off" class="formOff">
50 = TEXT
50.value = <INPUT type="submit" name="Aus" value="Aus"><input type="hidden" name="codeMode" value="off"></form></div>
}
}
plugin.tx_jphcodesnippets_pi.overallStyle = overflow: hidden
### Über Conditions setzen wir die Zeilennummern ###
#codeMode [on|off]
[globalVar = GP:codeMode = on]
plugin.tx_jphcodesnippets_pi.lineNumbers = numbers_normal
[end]
[globalVar = GP:codeMode = off]
plugin.tx_jphcodesnippets_pi.lineNumbers >
[end]
### CodeBox Elemente ###
/** Wir rendern erst das Content Element in ein eigenes DIV. (10)
* Dann erzeugen wir die Button und schreiben sie in ein DIV (20)
*/
lib.codeboxheader = COA
lib.codeboxheader {
10 = RECORDS
10 {
source.current = 1
tables = tt_content
select.orderBy = sorting
select.where = hidden = 0 and deleted = 0 and colPos = 0
wrap = <div class="codeTitle">|</div>
}
20 = COA
20 {
10 = TEXT
10.value = <div class="codeControls">
15 = TEXT
15.value = <div class="controlText">Zeilennummerierung</div>
20 = TEXT
20.typolink.parameter.data=TSFE:id
20.typolink.returnLast = url
20.wrap = <form action="|" target="_top" method="post" name="on" class="formOn">
30 = TEXT
30.value = <INPUT type="submit" name="An" value="An"><input type="hidden" name="codeMode" value="on"></form>
40 = TEXT
40.typolink.parameter.data=TSFE:id
40.typolink.returnLast = url
40.wrap = <form action="|" target="_top" method="post" name="off" class="formOff">
50 = TEXT
50.value = <INPUT type="submit" name="Aus" value="Aus"><input type="hidden" name="codeMode" value="off"></form></div>
}
}


