Bug #43708
closedleveluid with slide doesn't work across multiple levels
0%
Description
We use the following TypoScript code to display a header image from a page up in the root path when there is no image on the current page:
temp.headerimage = FILES temp.headerimage { references { table = pages uid.data = leveluid:-2, slide fieldName = media } renderObj = COA renderObj { 10 = IMAGE 10 { file.import.data = file:current:publicUrl } } }
This works only if the image is one level up from the current page, but not for 2 or more levels.
Updated by Andreas Wolf almost 12 years ago
- Status changed from New to Needs Feedback
So it works if you use leveluid:-1
?
Updated by Jochen Weiland almost 12 years ago
It works if the following TypoScript code is used:
file.import.data = levelmedia: -1,slide file.treatIdAsReference = 1
It's in the TSref 6.0 (which has not been released yet)
Ticket can be closed
Updated by Tobias Liebig almost 12 years ago
- Status changed from Needs Feedback to Closed
Updated by Benjamin Robinson about 11 years ago
To get the current page's media and slide from it's parents you need:
uid.data = leveluid:-1, slide.. not -2.
But the bug still (6.1.3) exists: "slide" does not work in this case...
temp.headerimage = FILES temp.headerimage { references { table = pages uid.data = leveluid:-1, slide fieldName = media } renderObj = COA renderObj { 10 = IMAGE 10 { file.import.data = file:current:publicUrl } } }I would suggest to reopen this issue.
Updated by Björn Jacob almost 11 years ago
@Ben: I think leveluid:-1 doesn't make any sense since it returns the page uid of the current page. IMHO there's always a uid and it will not slide higher in the tree. levelmedia-1, slide should do it. In my case it returns a whole bunch of comma separated uids (file references). This also doesn't make any sense. So I suggest levelmedia is not working in current TYPO3 6.2beta5.
Updated by Bernhard Berger over 9 years ago
lib.logo = FILES
lib.logo {
references {
table = pages
uid.data = leveluid:-1, slide
fieldName = tx_extension_additional_field_in_pages_table
}
renderObj = COA
renderObj {
10 = TEXT
10 {
data = file:current:publicUrl
}
}
}
also doesn't work.