Cast Iron Coding, Inc

TYPO3 Admin's Corner

Click here to return to the TYPO3 Admin's Corner

Stay Connected

Complete the form below to sign up for the CIC newsletter. We send out about one message each month and we do our best to make sure it's full of useful information about TYPO3. We'll never share your email address with a third-party and should you ever change your mind, unsubscribing is a breeze.
TypoScript Techniques

Understanding optionSplit

By: Lucas Thurston


Things only become slightly more complex when we have subexpressions in each of the three parts. The main rules still hold true:

1) the parts are prioritized last, first, middle,
2) the subparts are prioritized according to their context,
3) when there are enough values that a value needs to repeat, it comes from the lowest priority subpart, or
4) if there is a middle, it will rotate or repeat as necessary.

These types of expressions would become increasingly difficult to describe in our shorthand. Here is an attempt to demonstrate how optionSplit would prioritize each item in a longer expression:

89
3456721
string1||string2||string3|*|string4||string5|*|string6||string7|


The "middle" part will continue to cycle through its values until each item has a value assigned by optionSplit.

Posted on Friday, August 26, 2005 at 12:54 PM.