[Typo3] Generating numbered get variables from pagelist

Peter Klein peter at umloud.dk
Sat Sep 10 11:43:06 CEST 2005


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