Reputation: 397
I'm trying to insert the currently logged in fe_user's UID into a typoscript select statement. I need the total record count based on a few conditions, and get only the number of records that belong to the current user (by recipientuseruid).
There's what I have been trying so far:
lib.newMessagesCountLabel = CONTENT
lib.newMessagesCountLabel {
table = tx_mygigs_domain_model_message
select {
selectFields = count(*) AS count
pidInList = 20
where = ( isread='0' AND hidden='0' AND deleted='0' )
andWhere = recipientuseruid={TSFE:fe_user|user|id}
}
renderObj = COA
renderObj {
10 = TEXT
10 {
wrap = |
data = field:count
}
}
}
But as you can guess without any luck so far. I'm using TYPO3 6.1.
Thanks!
Upvotes: 0
Views: 375
Reputation: 1488
Try
andWhere.dataWrap = recipientuseruid={TSFE:fe_user|user|uid}
Btw: Since TYPO3 4.6: "where" is stdWrap also so you can simply write
where.dataWrap = isread=0 AND hidden=0 AND deleted=0 AND recipientuseruid={TSFE:fe_user|user|uid}
Upvotes: 2