[TYPO3-dev] Multiple stdWraps

Stefan Neufeind typo3.neufeind at speedpartner.de
Fri Jul 29 12:03:48 CEST 2011


Hi,

There is a possibility for multiple (nested) stdWraps. However that can
get a bit hard to handle if you have like 10 or so stdWraps to execute
in order.

There is a forge-issue which intends to introduce string-replacement to
stdWrap, at:
http://forge.typo3.org/issues/19347
https://review.typo3.org/3855

And that intends to introduce something like:
20 = TEXT
20 {
  value = There_is_a_cat,_a_dog_and_a_tiger_in_da_hood!_Yeah!
  stdWrap.replacement {
    10 {
      search = _
      replace.char = 32
    }
    20 {
      search = in da hood
      replace = around the block
    }
  }
}


How about if we allow multiple (ordered) stdWraps to be executed as a
general stdWrap-functionality? Imho it shouldn't conflict with the
stdWrap-settings we already have and would allow to execute stdWraps is
an arbitrary order, multiple ones in one go.

For the above mentioned string-replacements that could imho mean:
20 = TEXT
20 {
  value = There_is_a_cat,_a_dog_and_a_tiger_in_da_hood!_Yeah!
  stdWrap {
    10.replacement {
      search = ...
      replace
    }
    20.replacement {
      search = ...
      replace
    }
  }
}

But it would not be limited to string-replacements and would allow to It
would also allow to later add/remove/modify your various
stdWrap-settings further down the TypoScript-chain in your templates.


If somebody says that idea is not complete rubbish for a certain reason,
I'll add a forge-issue and propose a bit code for it.


Kind regards,
 Stefan




More information about the TYPO3-dev mailing list