图像和图像资源
从文件中获取图像
lib.myImage = IMAGE
lib.myImage.file = fileadmin/My-Image.png
lib.myImage.file.width = 100
lib.myImage.file.height = 100
从页面属性中获取图像
lib.pageImage = IMAGE
lib.pageImage {
file.import.data = levelmedia: -1, "slide"
file.import = uploads/media/
file.import.listNum = 0
file.import.override.field = media
border = 0
altText = xy
titleText = xy
}
从页面资源(FAL)获取图像
lib.pageResources = FILES
lib.pageResources {
references {
table = pages
uid.data = uid
fieldName = media
}
renderObj = IMAGE
renderObj {
file {
import.data = file:current:uid
treatIdAsReference = 1
width = 150c
height = 150c
}
altText.data = file:current:alternative
titleText.data = file:current:title
}
maxItems = 3
}
获取图像资源
lib.myImage = IMAGE
lib.myImage.file = fileadmin/My-Image.png
lib.myImage.file.width = 100
lib.myImage.file.height = 100
lib.myImage.stdWrap.wrap (
<div style="background-image:url(|); width:100px; height:100px;">Headline</div>
)
从内容元素中获取图像
lib.ceImages = FILES
lib.ceImages {
stdWrap.wrap = <div class="pic">|</div>
references {
table = tt_content
// current CE (needs context)
#uid.data = uid
// for CSC
fieldName = image
// for FSC
fieldname = assets
}
renderObj = IMAGE
renderObj {
file {
import.data = file:current:uid
treatIdAsReference = 1
width = 150c
height = 150c
}
altText.data = file:current:alternative
titleText.data = file:current:title
stdWrap.typolink.parameter.data = file:current:link
}
maxItems = 5
}