[TYPO3-english] optionSplit for text value

Scotty C superscotty19 at yahoo.com
Thu Jul 12 10:01:10 CEST 2012


Hi Sergio,

You're in luck! I literally just gave a presentation on the whacky world of optionsplit. 

The best example usage I can of with optionsplit is to alternate menu item styles (useful for making tabular items more readable). The OptionSplit divides categories with a |*| and items with a ||. The idea - in the case of a dropdown menu (which is my current bane) - is, there's a topmost section (perhaps a graphical border), then all the menu items in the middle section, and then a bottom section (again another border). Let's play:

--- Format ---
Optionsplit is divided into 3 sections and 3 sections only. But, inside those sections you can have as many sub-sections as you want. The code is like this:
FIRST SECTION |*| MIDDLE SECTION  |*| LAST SECTION

--- Sections ---
Sections (and subsections) dictate how the real functionality of optionsplit will work. All you do is, separate sections with |*| and subsections with "||":
Item1 || Item2 [||...] |*| Item3 || Item4 |*| Item5 || Item6 || Item7

--- Test! ---
Let's see if you can answer this sample exercise. Cover up the right side of the table and guess what the result will be (sidebar: I hope this table is visible in your email client!): 

OptionSplititem1item2item3item4item5item6item7
------------------------------------------------------------------------------------------------------------------------------------
|*| r || g |*| rgrgrgr
r |*| g |*| brrgggbb
|*||*| b || g        bbbbbbg
r |*| g || b |*| rgbgbgb
r || g |*||*| b || wrggggbw


Once you get the hang of it, it's brilliant!

HTH,
-S.



________________________________
 From: Sergio <naguib.mahfuz at gmail.com>
To: TYPO3 English <typo3-english at lists.typo3.org> 
Sent: Thursday, July 12, 2012 1:47:55 AM
Subject: [TYPO3-english] optionSplit for text value
 
Hi list,

I'm using ttnewsgenericmarkers extension to add my own tag to tt_news
template and I have to face with the next problem: I want to "split" this
tag some way.

My TS knowledge is very poor. I've been looking for the optionSplit code
too, but I don't know how to use it correctly. Could you just help me?

The idea is doing something like that:

plugin.tt_news.genericmarkers {
  css = TEXT
  css {
    value = alpha || || omega
  }
}

I mean: using "alpha" text for the first element, nothing for the middle
parts and "omega" text for the last element.

This code doesn't work as it replaces all text, and it doesn't split it.

Thanks in advance,
Sergio
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list