Skip to content

Instantly share code, notes, and snippets.

@michaelklapper
Created March 14, 2013 22:46
Show Gist options
  • Save michaelklapper/5165916 to your computer and use it in GitHub Desktop.
Save michaelklapper/5165916 to your computer and use it in GitHub Desktop.
##################################################
# Background Images
#
lib.misc.background {
page = FILES
page {
references {
table = pages
uid.data = page:uid
fieldName = media
}
renderObj = COA
renderObj {
10 = IMAGE
10.file.import.data = file:current:publicUrl
}
stdWrap {
wrap = <div class="page-background">|</div>
override = <img test="{field:media}" src="fileadmin/images/body-bg.jpg" width="1400" height="992" alt="">
override.insertData = 1
override.if {
isFalse.field = media
}
}
}
}
#
# Temporary fallback
# TODO
#
[globalVar = TSFE:id = {$const.page.home}]
lib.misc.background {
page >
page = TEXT
page.wrap = <div class="page-background">|</div>
page.value = <img src="/typo3conf/ext/ronal_template/build/files/default/images/single/dummy/body-bg-home.jpg" width="1400" height="992" alt="">
}
[global]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment