[Typo3] Generating numbered get variables from pagelist

Marcel Douwstra marcel.douwstra at tros.nl
Tue Sep 13 10:32:29 CEST 2005


Hey Peter,

excellent!! Your example does exactly what I wanted! I had never read 
anything on LOAD_REGISTER so that part really opened my eyes.

Thanx a lot for the help!

Cheers,

Marcel Douwstra

Peter Klein wrote:
> Hi Marcel.	
> You can create a counter using LOAD_REGISTER.
> 
> Here's an example that is based on your TS code..
> 
> -- cut --
> temp.swfgetvars = COA
> temp.swfgetvars {
>   20 = CONTENT
>   20 {
>     table = pages
>     select {
>       pidInList = this
>       selectFields = uid,title
>     }
>     renderObj = COA
>     renderObj {
>       # Here we increment our register var "myCounter"
>       10 = LOAD_REGISTER
>       10.myCounter.cObject = TEXT
>       10.myCounter.cObject.data = register:myCounter
>       10.myCounter.cObject.wrap = |+1
>       10.myCounter.prioriCalc = intval
> 
>       # This generates the output, using the "myCounter" counter
>       20 = TEXT
>       20.insertData = 1
>       20.value = uid{register:myCounter}={field:uid}&title{register:myCounter}={field:title}&
>     }
>   }
>   # Remove the last trailing "&" sign.
>   stdWrap.substring = 0,-1
> }
> 
> page.911 < temp.swfgetvars
> -- cut --
> 
> 
> - Peter Klein (pmk65)
> 
> -----------------------
> This thread is located in the archive at this URL:
> http://typo3.org/documentation/mailing-lists/english-main-list-archive/thread/110138069/
> 					



More information about the TYPO3-english mailing list