[TYPO3-english] include TypoScript according to type (tt_news, tt_content)

Robert Wildling rowild at gmx.net
Mon May 12 17:02:35 CEST 2014


Thanks so much, Loek! I'll give that a try tomorrow! Or tonight... :-)

Kind regards,
Robert

Am 12.05.14 09:08, schrieb Loek Hilgersom:
> Hi Robert,
>
> You would build an array of alternative tt_news configurations,
> something like this:
>
>      10  = CASE
>      10 {
>          key.cObject = RECORDS
>          key.cObject {
>              tables = tt_news
>              dontCheckPid = 1
>              source {
>                  data = GP:tx_ttnews|tt_news
>                  intval = 1
>              }
>              conf.tt_news = TEXT
>              conf.tt_news.field = type
>          }
>
>          default < plugin.tt_news
>          default {
>          ... default tt_news configuration here
>      }
>          4 < plugin.tt_news
>          4 {
>          templateFile = yourcustomtemplatefortype4
>          genericmarkers {
>              yourmarker < lib.yourcontent
>              ...
>          }
>      }
>      }
>
> Finally, this object goes somewhere into your page template. How that is
> done depends on your setup and template engine.
>
> Loek
>
>
> On 12-05-14 08:58, Robert Wildling wrote:
>> Hey, Loek,
>>
>> good to read you here (and there!)!
>>
>> Thank you very much for your feedback! But I am quite a bit lost
>> here... where
>> would the appropriate tt_news-TS be loaded?
>>
>> The thing is that I want 3 more tt_news types, and each type has it's own
>> templateFile and its own genericmarkers. Of course, there is always
>> the way to
>> include the TS on the very page, but it would be a way smoother way to
>> include
>> the appropriate TS on "Type Selection", so-to-say...
>>
>> I'd be grateful for any further hints...!
>>
>> Thanks a lot!
>> Robert
>>
>> Am 11.05.14 22:01, schrieb Loek Hilgersom:
>>> Oh, sorry, the example is still using some register here, should be this
>>> of course:
>>>
>>>      10  = CASE
>>>      10 {
>>>          //key.data = register:tt_news_type
>>>
>>>          key.cObject = RECORDS
>>>          key.cObject {
>>>              tables = tt_news
>>>              dontCheckPid = 1
>>>              source {
>>>                  data = GP:tx_ttnews|tt_news
>>>                  intval = 1
>>>              }
>>>              conf.tt_news = TEXT
>>>              conf.tt_news.field = type
>>>          }
>>>
>>>          default = TEXT
>>>          default.value = DEFAULT
>>>          3 = TEXT
>>>          3.value = THREE
>>>          4 = TEXT
>>>          4.value = FOUR
>>>      }
>>>
>>> The commented line is what you could use if you've got the value stored
>>> already.
>>> Cheers,
>>> Loek
>>



More information about the TYPO3-english mailing list