[TYPO3-english] "current" property of stdWrap

Victor Livakovsky v-tyok at mail.ru
Mon Nov 21 01:44:02 CET 2011

Hi, list.

I've started re-reading of TS manuals - want to improve the way, I'm using 
it :)
And I'm stuck with "current" value - I don't get, how can I use it? I found 
this article [1] of Dmitry, that explains a meaning of this value and how to 
manipulate it, but I still can't see an advantage of using it. And here are 
my questions:

1. Why should I use "setContentToCurrent", if I can directly operate the 
content without setting/getting it to/from "current" value.

2. "TS Syntax and In-depth study" document contains such code at the end of 
one chapter [2]:
styles.content.bulletlist = TEXT
styles.content.bulletlist {
  current = 1
  trim = 1
  if.isTrue.current = 1
        # Copying the object "styles.content.parseFunc" to this position
  parseFunc < styles.content.parseFunc
  split {
    token.char = 10
    cObjNum = 1
    1.current < .cObjNum
    1.wrap = <li>
    # Setting wrapping value:
  fontTag = <ol type="1"> | </ol>
  textStyle.altWrap = {$styles.content.bulletlist.altWrap}

I can understand, what it is doing, but I can't understand meaning of some 
styles.content.bulletlist.current = 1 - where the "current" values was 
filled from, so we can copy it to our current content? How can I know, that 
in my, f.e. TEXT object, "current" value already contains something?
styles.content.bulletlist.split.1.current < .cObjNum - this line I can't 
understand at all... copying "1" instead of normal assigning it?

3. Is the "current" value is shared among all objects or each object has 
it's own "current" value?

Thank you in advance.

[1] http://dmitry-dulepov.com/article/typo3-stdwrap-explained-part-1.html

More information about the TYPO3-english mailing list