Bug #43708
closed
leveluid with slide doesn't work across multiple levels
Added by Jochen Weiland almost 12 years ago.
Updated over 9 years ago.
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.
- Status changed from New to Needs Feedback
So it works if you use leveluid:-1
?
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
- Status changed from Needs Feedback to Closed
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.
@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.
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.
Also available in: Atom
PDF