Click here to return to the TYPO3 Admin's Corner

There's no evidence of option-splitting occurring here, but all properties of .NO are parsed by optionSplit, and thus the second line is a valid optionSplit expression as it produces controlled output. Without either of the optionSplit dividers in the expression, the split output simply remains the same for each menu item. The shorthand I'm going to use in this article would represent this expression this way(note that the asterisk on the far right indicates repitition):
n|*||*| produces n*
Let's first look at how the parts splitter, aka the FML divider ( |*| ), behaves in simple expressions, and then follow with thesubparts divider ( || ) since its behavior varies with the context it appears in(ie whether it appears first, middle or last as determined by the FML divider). We are told that optionSplit prioritizes the options of this divider in the order: last, first, middle.
first_part|*|middle_part|*|last_part
This means that if there were only one menu page grabbed by the HMENU (we'll continue using the menu example as it is the most relevant), optionSplit would return: last_part. With two pages: first_part, last_part. With three or more pages the first_part would occur in the first slot, the last_part in the last and all middle pages would be middle_part since the middle repeats. Additionally, with no middle_part:
first_part|*||*|last_part
the first_part would simply repeat until the last_part terminates the optionSplit. This expression would be very useful for a menu where the items are separated by a horizonal line(often seen on footers of webpages), like this:
Who | What | When | Where | Why | How
Each page title has a horizonal bar following it, except for the last. We could describe this in a more useful shorthand like this: first..., second Since the last always has priority with the FML divider, and we have a repeating value for all other pages, this menu is created like this:
lib.mainMenu = HMENU
lib.mainMenu.1 = TMENU
lib.mainMenu.1 {
SPC=|
expAll = 1
wrap = |
NO.allWrap = | ||*||*| |
NO.linkWrap= |
}