[TYPO3-english] Re: pt_extlist and m:n-relations
Michael Bakonyi
m.bakonyi at civit.de
Tue May 6 10:23:14 CEST 2014
Hey Daniel,
thanks a lot for your help I recently found the same solution on my own based on the following link :)
http://stackoverflow.com/questions/3935695/how-do-i-concatenate-strings-from-a-subquery-into-a-single-row-in-mysql
So here's my TS for anyone else having the same knot in the brain:
listConfig.contacts {
default.sortingColumn = lastName
backendConfig < plugin.tx_ptextlist.prototype.backend.typo3
backendConfig {
tables (
tt_address
)
baseFromClause (
tt_address
LEFT JOIN (tt_address_group,tt_address_group_mm) ON (tt_address.uid = tt_address_group_mm.uid_local AND tt_address_group.uid = tt_address_group_mm.uid_foreign)
)
baseGroupByClause (
tt_address.uid
)
baseWhereClause (
tt_address.pid = {$site.extension.pt_extlist.contacts.storagePid}
)
}
fields {
lastName {
table = tt_address
field = last_name
}
firstName {
table = tt_address
field = first_name
}
addressgroup {
special = group_concat(tt_address_group.title SEPARATOR '<br /> ')
}
}
More information about the TYPO3-english
mailing list