I have created a countries plugin that extends tt_content. In setup.typoscript I output the fields like this:
tt_content.countries {
fields {
content {
fields {
countries_text1 = TEXT
countries_text1 {
field = countries_text1
}
countries_text2 = TEXT
countries_text2 {
field = countries_text2
}
countries_repeater = COA
countries_repeater {
10 = CONTENT
10 {
table = tx_countries_domain_model_repeater
select {
selectFields = title,country
pidInList.field = pid
where = parent_table='tt_content' AND parent_uid=422
orderBy = sorting
}
renderObj = COA
renderObj {
10 = TEXT
10 {
field = title
htmlSpecialChars = 1
wrap = {"title": "|"###BREAK###
}
20 = TEXT
20 {
field = country
htmlSpecialChars = 1
wrap = "country": "|"}###BREAK###
}
}
stdWrap.split {
token = ###BREAK###
cObjNum = 1 |*|2|*| 3
1 {
current = 1
stdWrap.wrap = [|
}
2 {
current = 1
stdWrap.wrap = ,|
}
3 {
current = 1
stdWrap.wrap = |]
}
}
}
}
}
}
}
}
And it works. It outputs what I need, but only for the specified parent_uid=422. Can you tell me how I can replace "422" with the uid from the tt_content table?
I have tried parent_uid=current:uid, parent_uid=###data.uid### and parent_uid=###uid### with data = current:uid. But all options return an error.
Appreciate any hints you can give me.
TypoScript has the marker
property below select
, with which you can insert a value (and use full stdWrap properties) in a WHERE
clause.
select {
selectFields = title,country
pidInList.field = pid
where = parent_table='tt_content' AND parent_uid=###parentUid###
markers {
parentUid.field = uid
}
orderBy = sorting
}