[TYPO3-english] Split submenu TS challenge

Paul Vetch paul.vetch at kcl.ac.uk
Thu Apr 28 21:09:00 CEST 2011


OK, after a bit of to and fro, Tomas Mrozek came up with the following TS 
snippet which does *exactly* the job. Awesome!  I knew this must be possible 
with TS ... many thanks Tomas

(this is a simplified version which deals with the grouping and markup):

10 = HMENU
[...]
10.2 = TMENU
10.2 {
  alternativeSortingField = abstract DESC, sorting ASC
  NO {
    doNotLinkIt = 1
    stdWrap >
    stdWrap.cObject = COA
    stdWrap.cObject {
      10 = TEXT
      10 {
        if.isTrue.field = abstract
        field = title
        typolink.parameter.field = uid
        wrap = <li>|</li><!--1-->
      }
      20 = TEXT
      20 {
        if.isFalse.field = abstract
        field = title
        typolink.parameter.field = uid
        wrap = <!--2--><li>|</li>
      }
    }
  }
  stdWrap {
    split {
      token = <!--1--><!--2-->
      cObjNum = 1 || 2
      1 = TEXT
      1 {
        current = 1
        wrap = <ul>|</ul>
      }
      2 = TEXT
      2 {
        current = 1
        wrap = <ul>|</ul>
      }
    }
  }
}



"Björn Pedersen"  wrote in message 
news:mailman.1.1303903785.31960.typo3-english at lists.typo3.org...

Am 27.04.2011 12:51, schrieb Paul Vetch:
>
> If I use 'allStdWrap.if.isTrue.field = abstract' or something within the
> NO, then great, I can isolate all of the abstract/image containing menu
> items and format them how I want.  But then how to get the rest of the
> menu items and output them afterwards?  (I think somehow this may be the
> answer)
>
> Paul

....if.negate=1 could help here.
Otherwise, itemProcFunc can always help in such cases.

Björn 



More information about the TYPO3-english mailing list