doNotLinkIt wenn kein Content vorhanden

Armin Bartsch, Mittwoch, 11. März 2009

Nur Seiten mit Content (Inhalt) als Link darstellen, Seiten ohne Content unverlinkt anzeigen.

Eigentlich sollte man im Menü keine Punkte aufführen die noch keinen Inhalt haben. Allerdings kann es z.B. auch mal gewünscht sein den Besucher neugierig zu machen und zukünftige Menü-Punkte schon einblenden zu lassen.

temp.localNavigation = HMENU temp.localNavigation { special = directory special.value = 309 excludeDoktypes = 6 1 = TMENU 1 { expAll = 1 wrap = <ul>|</ul> NO = 1 NO { doNotLinkIt = 1 wrapItemAndSub = <li> | </li> stdWrap.override.cObject =TEXT stdWrap.override.cObject { field = title typolink.parameter.field = uid if.isTrue.numRows { table = tt_content select.pidInList.field = uid } } } } } lib.menu_h < temp.localNavigation
  1. temp.localNavigation = HMENU
  2. temp.localNavigation {
  3.   special = directory
  4.   special.value = 309
  5.   excludeDoktypes = 6
  6.   1 = TMENU
  7.   1 {
  8.     expAll = 1
  9.     wrap = <ul>|</ul>
  10.     NO = 1
  11.     NO {
  12.       doNotLinkIt = 1
  13.       wrapItemAndSub = <li> | </li>
  14.       stdWrap.override.cObject =TEXT
  15.       stdWrap.override.cObject {
  16.         field = title
  17.         typolink.parameter.field = uid
  18.         if.isTrue.numRows {
  19.           table = tt_content
  20.           select.pidInList.field = uid
  21.         }
  22.       }
  23.     }
  24.   }
  25. }
  26.    
  27. lib.menu_h < temp.localNavigation

Sponsored by:

ideenwerft webhosting
ideenwerft caretaker