Hallo,
wie kann ich auf das Ursprungselement zugreifen, wenn ich über RECORDS auf einen anderen Datensatz verlinke. Hier mein TS:
# Bild klein
lib.t3sports.teamSmall.logo >
lib.t3sports.teamSmall.logo = CASE
lib.t3sports.teamSmall.logo {
key.field = t3logo
key.ifEmpty = 1
1.stdWrap.ifEmpty.cObject = IMAGE
1.stdWrap.ifEmpty.cObject {
file = {$filepaths.images}dummy_k.png
file {
XY = {$plugin.tx_cfcleaguefe_competition.maxH_logo_matchtable}
maxH = {$plugin.tx_cfcleaguefe_competition.maxH_logo_matchtable}
maxW = {$plugin.tx_cfcleaguefe_competition.maxW_logo_matchtable}
}
#altText.stdWrap.cObject = temp.teamLogoText
#titleText.stdWrap.cObject = temp.teamLogoText
titleText.field = name
}
1 = RECORDS
1 {
source.field = club
dontCheckPid = 1
tables = tx_cfcleague_club
conf.tx_cfcleague_club = IMAGE
conf.tx_cfcleague_club {
file.import.field = logo
file.import = uploads/tx_cfcleague/
file.maxH = {$plugin.tx_cfcleaguefe_competition.maxH_logo_matchtable}
file.maxW = {$plugin.tx_cfcleaguefe_competition.maxW_logo_matchtable}
titleText.field = name
}
}
default = IMAGE
default {
file.import.field = t3logo
file.import = uploads/tx_cfcleague/
file.maxH = {$plugin.tx_cfcleaguefe_competition.maxH_logo_matchtable}
file.maxW = {$plugin.tx_cfcleaguefe_competition.maxW_logo_matchtable}
titleText.field = name
}
}
Erklärung:
Falls t3logo leer ist, wird in der Tabelle tx_cfcleague_club geschaut ob da ein Logo hinterlegt ist. Ist dies nicht der Fall kommt das Dummybild.
Dieser TS funktioniert 1a mit dem Logo. Nur möchte ich immer beim titletext den Teamnamen hinterlegen und nicht, wenn das Bild aus dem Club kommt, den Clubnamen.
temp.teamLogoClubText = TEXT
temp.teamLogoClubText.value < temp.logo.titletext.field
# Bild klein
lib.t3sports.teamSmall.logo >
lib.t3sports.teamSmall.logo = CASE
lib.t3sports.teamSmall.logo {
...
1 = RECORDS
1 {
...
# Hier muss was anderes stehen, da hier das Feld Name ebenfalls in der Clubtabelle exisitiert
titleText.field = name
# folgende Versuche, funktionieren aber nicht
# titleText.stdWrap.cObject < temp.teamLogoClubText
# titleText.field = source.field.name
}
}
...
}
Wie kann ich das umsetzen? Hat jemand ne Idee?
mfg
schittl