jeudi 23 mai 2019

Typoscript if condition with field crdate in current year [9.5.7]

I have a HMENU with special = directoty and i try to select only these, which the field crdate is in the current year.

i try'd the following typoscript but they show all subpages in the tree also they are created in 2018.

lib.news.jahr = COA
lib.news.jahr{
5 = TEXT
5{
    current = 1
    setCurrent.data = date:U
    setCurrent.wrap = |
    prioriCalc = 1
    strftime = %Y
    wrap = <h3>News&nbsp;|</h3>
}

10 = HMENU
10{
    special = directory
    special.value = 87
    wrap = <ul>|</ul>

    1 = TMENU
    1{
        NO.wrapItemAndSub = <li>|</li>
        NO.if{
            equals.data = date:U
            equals.strftime = %Y
            equals.prioriCalc = 1
            value.data = field:crdate
            value.data.strftime = %Y
        }
    }
}
}

The Typoscript must work in the newest version 9.5.7

Aucun commentaire:

Enregistrer un commentaire