[TYPO3-german] dynamisches Hintergrundbild in CSS
Bernhard Prange
mail at bernhard-prange.de
Sat Feb 8 12:08:53 CET 2014
Hallo Liste,
ich möchte ein dynamisches Hintergrundbild pro Seite geneerierten was in
der
lib.backgroundImage =IMG_RECORDS
lib.backgroundImage{
file {
import = uploads/media/
import.data = levelmedia:-1, slide
import.listNum = 0
}
}
Das Lib Object kann ich auch via Fluid ausgeben. Der Pfad stimmt. Jetzt
möchte ich das Ganze in die CSS einbinden mit:
dynamicCssFile = PAGE
dynamicCssFile {
//the same typeNum is used to include the file, see below
typeNum = 108
config {
disableAllHeaderCode = 1
additionalHeaders = Content-Type:text/css
}
10 = TEMPLATE
10 {
template = FILE
template.file = fileadmin/yourDynamicCSSFile.css
marks.backgroundImage < lib.backgroundImage
}
}
//now the parsed object is added to your page
page.headerData = COA
//use any "free" number
page.headerData.809 = TEXT
page.headerData.809.value = <link rel="stylesheet" type="text/css"
href="./index.php?type=108" />
von http://typo3.org/documentation/snippets/sd/76/
Wenn ich marks.backgroundImage so anspreche, erhalte ich eine leere
Ausgabe. Definiere ich es als TEXT Object, nicht als IMG_RECORDS erhalte
ich den gewünschten Text. Woran liegt das? Hat jemand eine Begründung
für mich, bzw. einen Workaround?
Vielen Dank schonmal.
More information about the TYPO3-german
mailing list