[TYPO3-english] Templaviola question

Christopher Torgalson bedlamhotel at gmail.com
Wed Nov 25 19:42:16 CET 2009


On Wed, Nov 25, 2009 at 10:23 AM, La Farge Douglas
<doug at gcnpublishing.com> wrote:
> Using Templaviola is it possible to treat a TScript template like it's tt_content (so that i can place it in one or a couple of my defined TV containers on varoius pages)?

Yes. Take a look (using the list module) at the contents of the TV
data structure records. You'll see something like this in each content

10.tables = tt_content
10.wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end-->

I usually just turn this into a COA:

5 = COA
5 {
  5 < lib.layout.pre_content

  10 = RECORDS
  10 {
    source.current = 1
    tables = tt_content
    wrap = <!--TYPO3SEARCH_begin-->|<!--TYPO3SEARCH_end-->

  15 < lib.layout.post_content

And in my main TS template (or in an extension template), I can then
just define lib.layout.pre_content and lib.layout.post_content:

lib.layout.pre_content = COA
lib.layout.pre_content.5 = HTML
lib.layout.pre_content.5.value = foo

lib.layout.post_content = COA
lib.layout.post_content.5 = HTML
lib.layout.post_content.5.value = bar

Christopher Torgalson

More information about the TYPO3-english mailing list