[TYPO3-templavoila] How to configure a TV-field to be of type

Ron Hall ronslists at busynoggin.com
Sun Feb 27 20:12:59 CET 2011


Hello Žiga,

> The reason I moved TS from TV-XML field to TS-template was that it is much easier & faster to access it when I need to make any modifications or simply play with it. Also, the TV-module does not provide the ts "editor" with code completion and code coloring.

This is why I use the static data structure feature of TV which stores my DS's as files. Keep in mind that if you convert an existing site to static DS's be sure to make a back up first.

> (The other reason for moving from TV-XML code to TS-template was being able to access TS constants.)

You can do that already. You set the constant then copy that constant into TS setup. That makes it available to your DS through the "TypoScript_constants" tag. Here is an example.

In constants:
containerWidth = 400

In TS Setup
containerWidth = {$containerWidth}


In the DS field where you need it.
<TypoScript_constants>
       <containerWidth>{$containerWidth}</containerWidth>
</TypoScript_constants>

You can then use it in the TS of that field as the constant {$containerWidth}

I know that is a round about way of doing it but works. You can see more about it in the Futuristic Template Building tutorial.

Another way of approaching this situation is to stick your constant in the register and retrieve that in your DS.

Thanks,
Ron Hall


More information about the TYPO3-project-templavoila mailing list