[TYPO3-english] typoscript: replace string/background url if empty

jaco graaff jaco at spacexplorer.co.za
Tue Feb 11 00:59:15 CET 2014


I use a background image in my website - Typo3 6.1

Previously I was able to use leveluid:-1, slide to incrementally go up the 
page tree until I find a page-ref image OR use a default value:
url="location/defaultbackground.jpg"

now with FAL I am not successful in either

-------------------------------------PREVIOUS Typo3 4.6 
< ------------------------------------------

temp.bgimg = IMG_RESOURCE
    temp.bgimg {
    #-----default image (if none is found below)
    file = fileadmin/backgrounds/defaultBackground.jpg
    #-----per site image
    file.import = uploads/media/
    file.import.data = page:media
    file.import.listNum = 0
#wrap = ............
}

---------------------------------------CURRENT Typo3 6.1 
 > -------------------------------------------
backgroundImage = COA
       backgroundImage {
       10 = TEXT
       10.value = <div id="fullSizeBackground"><img 
id="fullSizeBackgroundImg" src="
20 = FILES
    20 {
        references {
            table = pages
            uid.data = leveluid:-1, slide
            fieldName = media
        }
        renderObj = TEXT
        renderObj {
//default does not work
            value = fileadmin/backgrounds/defaultBackground.jpg
            stdWrap {
                data = file:current:publicUrl
                required = 1
                wrap = |
            }
//tried this as well.... not working
             stdWrap.ifEmpty.wrap = 
fileadmin/backgrounds/defaultBackground.jpg|
            //wrap = |
        }
    }
------------------------------------------------------------------------------------------------------------------- 



More information about the TYPO3-english mailing list