Project

General

Profile

Actions

Feature #19347

closed

Integrate string replacement to stdWrap

Added by Oliver Hader over 15 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
TypoScript
Target version:
-
Start date:
2008-09-17
Due date:
% Done:

100%

Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:

Description

With stdWrap it's not possible yet to do (ordered) string replacements for processing content data.

On introducing a new stdWrap property "replacement" that takes a ordered list of replacement definitions multiple manipulations could be executed the same time. Additionally it regular expressions can be used if required.

<b>TypoScript example:</b>

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
    }
    30 {
      search = #a (Cat|Dog|Tiger)#i
      replace = an animal
      useRegExp = 1
    }
  }
}

The indexes 10, 20, 30 are just for setting an order on the execution of the replacement. Each subkey "search", "replace" and "useRegExp" has again stdWrap functionality.

(issue imported from #M9373)


Files

0009373.patch (3.51 KB) 0009373.patch Administrator Admin, 2009-05-28 17:49
0009373_typoscript.txt (333 Bytes) 0009373_typoscript.txt Administrator Admin, 2009-05-28 17:49
0009373_documentation.txt (1.45 KB) 0009373_documentation.txt Administrator Admin, 2009-05-28 18:13

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Feature #19320: Enable ascii for parsefunc-short replacementClosedOliver Hader2008-09-12

Actions
Actions

Also available in: Atom PDF