[TYPO3-english] Option Split assistance

JoH asenau info at cybercraft.de
Mon Jun 22 20:14:56 CEST 2009


> I have all of it working great!  Except that I cannot get the option
> split to drop a last ','
>
> and of course that throws a javascript error.
>
> I've read (and re-read and taken excedrine and re-read) about options
> splits and I thought I had it right but I still get a closing ','
> behind the last </ul>
>
> Typoscript:
>
>     temp.menu.2 = TMENU
>     temp.menu.2 {
>         wrap = |</ul>',' |*| |</ul>','  |*| |</ul>
>     }
>
> I sure could use some help.

First of all:
Please open a new thread instead of answering to a digest _and_ delete
unnecessary text when you answer within an existing thread :-)

Now to your question:

>     temp.menu.2 = TMENU
>     temp.menu.2 {
>         wrap = |</ul>',' |*| |</ul>','  |*| |</ul>
>     }

This doesn't make any sense, because optionSplit is only available for menu
items like NO, ACT, IFSUB but not for TMENU or GMENU.
So, what you want should be created within such a menu item.
You can use allWrap for the first part of the <ul>, since it offers stdWrap
properties to assign the value of field "alias" to the id.
The closing </ul> _and_ the comma should be set via wrapItemAndSub, because
this will make sure, the closing </ul> will be set _after_ the menu of
subpages.

temp.menu = HMENU
temp.menu {
    special = directory
    special.value = 40543
    1 = TMENU
    1 {
        noBlur = 1
        expAll = 1
        wrap = |
        NO {
            doNotShowLink = 1
            allWrap.dataWrap = <ul id="subnav_{field:alias}">
            wrapItemAndSub = |*||*| |<ul>',' || |<ul>
        }
    }
    2 = TMENU
    2 {
        noBlur = 1
        expAll = 1
        NO {
            wrapItemAndSub = <li>|</li>
            stdWrap.htmlSpecialChars = 1
        }
    }
}

Just some side notes:
There is no "stdWrap = TEXT"
There is no "expAll=1" for menu items
"doNotShowLink=1" should be enough so you can kick "doNotLinkIt=1"
instead of allStdWrap.insertData use allWrap.dataWrap (insertData is useful
for the replacement of multiple variables in different lines only)

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Twitter: http://twitter.com/bunnyfield
Xing: http://contact.cybercraft.de
T3 cookbook (2nd edition): http://www.4any1.de
TYPO3 Schulung: http://workshops.eqony.com




More information about the TYPO3-english mailing list