Skip to content

Instantly share code, notes, and snippets.

@DirkWolke
Last active June 13, 2016 21:50
Show Gist options
  • Save DirkWolke/f0fcf076173d56954334 to your computer and use it in GitHub Desktop.
Save DirkWolke/f0fcf076173d56954334 to your computer and use it in GitHub Desktop.
Counter width LOAD_REGISTER
lib.register = CONTENT
lib.register {
wrap = <div class="example">|</div>
table = tt_content
select {
pidInList = this
selectFields = *
where = colPos = 0
orderBy = sorting
languageField = sys_language_uid
}
renderObj = COA
renderObj {
1 = LOAD_REGISTER
1.counter {
data = register:counter
stdWrap.wrap = |+1
prioriCalc = 1
}
10 = TEXT
10 {
value = more than 1
if {
value = 1
isGreaterThan.data = register:counter
}
}
}
}
@Bunnyfield
Copy link

Without RESTORE_REGISTER this will shift the other register values with each loop count - so you should check that to be on the safe side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment