Skip to content

Instantly share code, notes, and snippets.

@alrnz
Last active May 8, 2019 08:44
Show Gist options
  • Save alrnz/92937e3b2f996183c55e to your computer and use it in GitHub Desktop.
Save alrnz/92937e3b2f996183c55e to your computer and use it in GitHub Desktop.
TYPOSCRIPT select field of years - shows the years up to the current #TYPO3 #TypoScript
year_dropdown = COA
year_dropdown {
10 = TEXT
10 {
# aktuelles Jahr
data = date : Y
wrap = <option>|</option>
}
20 < .10
20 {
current = 1
setCurrent.data = date : Y
# Letztes Jahr
setCurrent.wrap = | - 1
prioriCalc = 1
}
30 < .20
30.setCurrent.wrap = | - 2
40 < .20
40.setCurrent.wrap = | - 3
wrap = <select id="year" name="" class="select">|</select>
}
@alrnz
Copy link
Author

alrnz commented Sep 8, 2014

Aktuell (2014) würde es eine Liste der Jahre von 2011-2014 zeigen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment