TYPO3 12, PHP 8.2. I am trying to get the categories of my posts for some icons. Since i found no way of getting the categories directly in fluid i thought i'd give typoscript a try. This works fine in the base language, however the translations are empty. I have translated
This is how i envoke it in fluid:
{f:cObject(typoscriptObjectPath: 'lib.categories', data:'{recordUid: data.uid}')}
This is my typoscript CONTENT object:
lib.categories = CONTENT
lib.categories {
table = sys_category
select {
# set correct id for sys folder
pidInList = 652
selectFields = title, uid
join = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid
where.data = field:recordUid
where.intval = 1
where.wrap = uid_foreign=|
languageField = sys_language_uid
}
renderObj = COA
renderObj {
1 = TEXT
1 {
value = <li class="refcat refcat-{field:uid}"><span>{field:title} </span></li>
insertData = 1
}
}
}
i have even checkd the db, my content elements objects have the exact same categories and settings in both languages. Any ideas? Can this be done in Fluid or maybe even with a userFunc? Thanks
finally got it to work, just leaving out the languagefield is not enough, since TYPO3 7.4 you need to explicitly set it to 0
so this is the code that grabs the correct categories from the base language
table = sys_category
select {
# set correct id for sys folder
pidInList = 652
selectFields = title, uid
join = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid
where.data = field:recordUid
where.intval = 1
where.wrap = uid_foreign=|
languageField = 0
}