Zum Inhalt springen

TS-Variabeln 'vererben'

Erstellt am 4. Februar 2014 · 2 Antworten · letzte Antwort am 4. Februar 2014

Tags: TYPO3 6.x, Frage

kk_koenig ·

Moin,

und noch einer, da heute TS-TAg ist:
Ich habe alle meine TS-Scripte ausgelagert, um sie weiterzuverwenden. Dazu habe ich einige Basics in Variablen gesetzt. Meistens klappt das auch, aber warum hier nicht:

Teil 1 in constants.ts

base {
    # cat=base; type=string; label= base foldername for all includes
    basePath =  fileadmin/SITE-2014
}

Teil 2 in constants.ts

base {
    filepaths{

	# cat=filepaths; type=string; label=HTML Templates: Location of the (X)HTML templates relative to site
	templates = {$base.basePath}/templates/html/

	# cat=filepaths; type=string; label=CSS: Location of the Cascading Style Sheets relative to site
	css = {$base.basePath}/templates/static/css/

	# cat=filepaths; type=string; label=Images: Location of the images relative to site
	images = {$base.basePath}/templates/static/img/

	# cat=filepaths; type=string; label=Scripts: Location of the Javascript files relative to site
	scripts = {$base.basePath}/templates/static/js/

	# cat=filepaths; type=string; label=HTML Templates for extensions: Location of the (X)HTML templates for extensions
	extensions = {$base.basePath}/templates/extensions/
}
}

Teil 3 in
<INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/SITE-2014/TypoScript/Extension/TT_Address/setup.ts">

plugin.tx_ttaddress_pi1 {
    templatePath = {$filepaths.extensions}tt_address/
}

Was bitte ist daran falsch? Und warum geht es z.B. bei den {$filepaths.scripts} wunderbar?

und zu guter letzt, auch wenn es eigentlich eine eigene Frage wäre:
Warum geht nicht:
<INCLUDE_TYPOSCRIPT: source="FILE:{$base.basePath}/TypoScript/Extension/TT_Address/setup.ts">
Das wäre so geil!

Schweriner ·

Konstanten sollten sich problemlos vererben lassen, außer die existieren zur Laufzeit noch nicht. Bin mir aber nicht sicher ob man in den Kostanten auf Kostanten zugreifen kann.

kk_koenig ·

Wie gesagt, ich habe ein

page.includeJSFooter {
  file1 = http://code.jquery.com/jquery-2.1.0.min.js
  file1.external = 1
  file2 = {$filepaths.scripts}libs/bootstrap-collapse.js
  file3 = {$filepaths.scripts}libs/bootstrap.min.js
  file4 = {$filepaths.scripts}libs/jquery.sticky-kit.min.js
  file5 = {$filepaths.scripts}libs/jquery.unveil.min.js
  file8 = {$filepaths.scripts}mainfunctions.js

}

das geht wunderbar