Return to Snippet

Revision: 24349
at February 27, 2010 04:58 by z0r1k


Initial Code
# ==============================================================================
# Main menu (first level) - Left side navigation
# ==============================================================================
# first level, e.g. tabs
lib.mainnavi = HMENU
lib.mainnavi.entryLevel = 1
lib.mainnavi {
  1 = TMENU
  1 {
    wrap = <ul>|</ul>

    NO = 1
    NO {
      allStdWrap.insertData = 1
      ATagTitle.field = description // subtitle // title

      stdWrap.cObject = COA
      stdWrap.cObject {
        10 = TEXT
        10.field = subtitle // title

        # Get the unix timestamp from newUntil w/o time and add 23:59:59
        15 = LOAD_REGISTER
        15 {
          today {
            cObject = TEXT
            cObject {
              data = field:newUntil
              wrap = |+86399
            }

            prioriCalc = intval
          }
        }

        20 = LOAD_REGISTER
        20 {
          new.cObject = TEXT
          new.cObject {
            value = new
            wrap = class="|"
            if {
              value.data = date: U
              isLessThan.data = register:today
              negate = 1
            }
          }
        }

        30 = LOAD_REGISTER
        30 {
          firstnew < lib.mainnavi.1.NO.stdWrap.cObject.20.new
          firstnew.cObject.value = firstnew
        }

        40 = LOAD_REGISTER
        40 {
          lastnew < lib.mainnavi.1.NO.stdWrap.cObject.20.new
          lastnew.cObject.value = lastnew
        }
      }

      allWrap = <li {register:firstnew}> |*| <li {register:new}> |*| <li {register:lastnew}>|</li>
    }

    ACT < .NO
    ACT = 1
    ACT {
      ATagParams = class="active"
    }

    ACTIFSUB = 1
    ACTIFSUB {
      wrapItemAndSub = <li> | </li>
      allWrap = <strong> | </strong>
      linkWrap = |
      ATagBeforeWrap = 0
      ATagParams = class="active"
    }
  }

  2 < .1
  3 < .1
  4 < .1
}

Initial URL

                                

Initial Description

                                

Initial Title
CSS class "new", "firstnew" and "lastnew" for TypoScript HMENU/TMENU with "newUntil" field enabled

Initial Tags
navigation

Initial Language
TYPO3