[TYPO3] TypoScript - userFunc - passing value

Peter Foerger p.foerger at vke-design.de
Wed May 30 12:29:25 CEST 2007


Tomas Mrozek schrieb:
> TypoScript code:
> ---------------
> subparts.TEST = USER
> subparts.TEST {
>   userFunc = user_myClass->myFunction
>   myValue = ???
> }
> 
> I would like to pass to the function "myFunction" specific TYPO3 data as
> the "myValue" variable, and I have just found that my knowledge of
> TypoScript is still quite messy.
> 
> Example of what I would like to assign to that variable:
> -------------------------------------------------------
> subparts.TEST = USER
> subparts.TEST {
>   userFunc = user_myClass->myFunction
>   myValue = GPVar:tx_ttnews|news
> }
> 
> ...OR...
> 
> temp.test = TEXT
> temp.test.value = 99
> 
> subparts.TEST = USER
> subparts.TEST {
>   userFunc = user_myClass->myFunction
>   myValue < temp.test
> }
> 
> I have searched the docs and tried to google out some example but I just
> can't figure it out. I don't know how to assign/pass values.
> Please, could anyone give me a hint on how to do it?
> 
> Thank you in advance!
> 
> Tomas Mrozek


page.includeLibs.my_class = some_path/my_class.php

tmp.bla = COA
tmp.bla {
   10 = USER
   10 {
      userFunc = my_class->my_function
      param1 = value1
      param2 = value2
      basicContent = COA
      basicContent {
         10 = TEXT
         10.value = I like TS
      }
   }
}

cheers
Peter


More information about the TYPO3-english mailing list