Bug #43708
leveluid with slide doesn't work across multiple levels
Status: | Closed | Start date: | 2012-12-07 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | TypoScript | Spent time: | - | |
Target version: | - | |||
TYPO3 Version: | 6.0 | Is Regression: | ||
PHP Version: | 5.3 | Sprint Focus: | ||
Complexity: |
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.
Related issues
History
#1 Updated by Andreas Wolf over 2 years ago
- Status changed from New to Needs Feedback
So it works if you use leveluid:-1
?
#2 Updated by Jochen Weiland over 2 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
#3 Updated by Tobias Liebig over 2 years ago
- Status changed from Needs Feedback to Closed
#4 Updated by Ben Robinson almost 2 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.
#5 Updated by Bjoern Jacob over 1 year 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.