[TYPO3-english] FAL, pages media, default image and override if exists
Jan Slusarczyk
jan.slusarczyk at gmail.com
Sun Aug 24 23:55:55 CEST 2014
On 24/08/14 18:03, Gregor Hermens wrote:
> Jan Slusarczyk wrote:
>
>> 2. use only the first image defined in media field, and not every one
>
> x = FILES
> X {
> references {
> ...
> }
> maxItems = 1
> }
>
> For details see
>
> http://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Files/
Thank you!
I've solved my other problem with the following:
before.cObject = FILES
before.cObject {
stdWrap.ifEmpty.cObject = IMAGE
stdWrap.ifEmpty.cObject {
file = fileadmin/templates/img/100-63.png
altText.field = subtitle // title
}
references {
table = pages
fieldName = media
}
maxItems = 1
renderObj = IMAGE
renderObj {
altText.field = subtitle // title
wrap = <div class="imgNew">|</div>
file {
import.data = file:current:publicUrl
width = 100
height = 63c
}
}
}
regards
Jan
More information about the TYPO3-english
mailing list