Bug #43708

leveluid with slide doesn't work across multiple levels

Added by Jochen Weiland almost 7 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2012-12-07
Due date:
% Done:

0%

TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

Related to TYPO3 Core - Bug #43691: Media Image Import is broken Closed 2012-12-06
Related to TYPO3 Core - Bug #55706: Different behavior of levelmedia in TYPO3 6.2 Closed 2014-02-05

History

#1 Updated by Andreas Wolf almost 7 years ago

  • Status changed from New to Needs Feedback

So it works if you use leveluid:-1?

#2 Updated by Jochen Weiland almost 7 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 almost 7 years ago

  • Status changed from Needs Feedback to Closed

#4 Updated by Ben Robinson over 6 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 almost 6 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.

#6 Updated by Bernhard Berger over 4 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.

Also available in: Atom PDF