[TYPO3] If only one sub-page

tapio tapio.markula at dnainternet.net
Wed Mar 15 09:05:16 CET 2006


Hi

In this list has been discussion how to create menu, if there is 
sub-pages or not


   # Menu shown if current page got subpages
   10 = HMENU
   10.special = directory
   10.special.value.field = uid
   10.if.isTrue.numRows {
     table=pages
     select.pidInList.data = uid
   }
   10.1 = TMENU
   10.1 {
     wrap = <ul id="side-menu">|</ul>
     NO {
       linkWrap = <li>|</li>
     }
   }

Is  there any way to set condition (using option split or some other 
method) if there is *one* subpage.

I created classes using option split but the problem is that using 
something |*| something |*|

the *last* is the dominant factor. Even if it would be the first,
I would have problems. I need *own* setting for an item, if there is jus 
  t one item. Is this possible?

I would need this wrap if there is just one item.

NO.linkWrap=<span class="first last">| </span>

normal situation (if more than one)
NO.linkWrap=<span class="first">| </span> |*| <span class="middle">| 
</span> |*| <span class="last">| </span>

first and last defines margins. If there is just <span class="last">

the item is missing top margin



More information about the TYPO3-english mailing list