Search code examples
typo3typoscripttypo3-7.6.x

Typoscript operators - Value of filelink referencing to another one


I've set up the Typoscript below, but the last line doesn't work. I want 20.filelink to have the same content as 10.filelink (the real code is more complex and that bit is redundant).

lib.test = COA
lib.test {

  10 = TEXT
  10.value = A value

  10.filelink {
    path = fileadmin/path/
    target = blank
    stdWrap.wrap = <li>|</li>
    }

  20 = TEXT
  20.if.isFalse.data = subheader
  20.value = Another value
  20.filelink =< lib.test.10.filelink

}

Copying (with the < operator) works, but not =< as stated.

I've also tried without the lib.test. or with just = but without any success.

  • Is what I want to do possible?

  • What did I not understand about operators?


Solution

  • I figured out what I did not understand. Apparently, you can only copy or reference Content Objects.

    The answer then is to reference the entire object, and to modify and add what needs changing. In this case it would be:

    lib.test = COA
    lib.test {
    
      10 = TEXT
      10.value = A value
    
      10.filelink {
        path = fileadmin/path/
        target = blank
        stdWrap.wrap = <li>|</li>
        }
    
      20 = < lib.test.10
      20.if.isFalse.data = subheader
      20.value = Another value
    
    }