Reputation: 1362
In my Fluid template I have a uid of a category. How can I get an image from a field on that category?
I've tried <f:cObject typoscriptObjectPath="lib.catImage" data="{myuid}" />
Then something like:
lib.catImage = CONTENT
lib.catImage {
table = sys_category
current = 1
select {
fieldName = cat_image
}
renderObj {
???
}
}
Upvotes: 0
Views: 735
Reputation: 2577
You don't want to get CONTENT
but FILES
:
lib.catImage = FILES
lib.catImage {
maxItems = 1
references {
table = sys_category
uid.data = field:uid
fieldName = images
}
renderObj = TEXT
renderObj {
stdWrap.data = file:current:uid
}
}
And call it via <f:cObject typoscriptObjectPath="lib.catImage" data="{uid: {myuid}}" />
Upvotes: 1