---
title: "TS-Variabeln 'vererben'"
url: "https://www.typo3.net/d/117306-ts-variabeln-vererben"
source: "typo3.net"
tags: ["TYPO3","TypoScript","Frage","TYPO3 6.x"]
created: "2014-02-04"
last_reply: "2014-02-04"
replies: 2
solved: false
page: 1
pages: 1
lang: "de"
---

# TS-Variabeln 'vererben'

TYPO3 › TypoScript · 2 Antworten · gestartet 2014-02-04

## Eröffnungsbeitrag

**kk_koenig** · 2014-02-04 · [Beitrag #1](https://www.typo3.net/d/117306-ts-variabeln-vererben/1)

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

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

Teil 2 in constants.ts

```typoscript
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">

```typoscript
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!

## Antworten

### [#2](https://www.typo3.net/d/117306-ts-variabeln-vererben/2) · Schweriner · 2014-02-04

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.

### [#3](https://www.typo3.net/d/117306-ts-variabeln-vererben/3) · kk_koenig · 2014-02-04

Wie gesagt, ich habe ein

```typoscript
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

---

Quelle: „TS-Variabeln 'vererben'“, typo3.net, https://www.typo3.net/d/117306-ts-variabeln-vererben
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
