Typo Script Basics
Random Content, Aktuelles Datum ausgeben, tx_news date, tx_news alle Kategorien ausgeben
Random Content
block.teaser = COA_INT
block.teaser {
10 = CONTENT
10 {
table = tt_content
select {
selectFields = *, rand() as virt_rnd
# UID of the page with the content elements
pidInList = 1
where = colPos=1
# amount of content elements to find
max = 4
# randomize
orderBy = virt_rnd
# constrain by language
languageField = sys_language_uid
}
}
}
Aktuelles Datum ausgeben
temp.aktuelles_datum = TEXT
temp.aktuelles_datum {
data = date : U
strftime = %Y
}
tx_news date
plugin.tx_news._LOCAL_LANG.de.dateFormat = %d / %m / %Y
plugin.tx_news._LOCAL_LANG.en.dateFormat = %d / %m / %Y
tx_news alle Kategorien ausgeben
<f:if condition="{newsItem.categories}">
<f:for each="{newsItem.categories}" as="category" iteration="iteratorCategories">
{category.title}
</f:for>
</f:if>