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

2014-02-11 Thread Muriel le Pair

jaco graaff schreef op 11-02-14 00:59:

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 = 
}


Hi Jaco,

It's not well documented but in order to get it working in TYPO3 6.1 you 
need to add treatIdAsReference = 1 (works both for IMAGE and IMG_RESOURCE)


So something like this:

temp.bgimg = IMAGE
temp.bgimg {
  required = 1

  file {
 treatIdAsReference = 1
 import= uploads/media/
 import {
   data = levelmedia: -1,slide
   listNum = 0
   override.field = media
 }
   }
}

--
kind regards,

Muriel le Pair
___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


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

2014-02-10 Thread jaco graaff

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=fullSizeBackgroundimg 
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 = |
   }
   }
--- 


___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


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

2014-02-10 Thread jaco graaff

I got the default to work by wrapping it in a COA

It would be great to get the background image from a parent page and 
automatically show it on child-pages to the nth level if they do not have 
their own image instead of just a single default image


---CURRENT Typo3 6.1 
 ---

backgroundImage = COA
  backgroundImage {
  10 = TEXT
  10.value = div id=fullSizeBackgroundimg
id=fullSizeBackgroundImg src=

##get the source else default

20 = COA
 20 {
 stdWrap.ifEmpty = fileadmin/backgrounds/abstract/sjared0.jpg
 10 = FILES
 10 {
 references {
 table = pages
## i don't know if the following works - will have to test...
 uid.data = leveluid:-1, slide
 fieldName = media
 }
 renderObj = TEXT
 renderObj {
   #required = 1
   data = file:current:publicUrl
 }
 }
 }

 30 = TEXT
 30.value = //div
 }






--- 


___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


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

2014-02-10 Thread jaco graaff
finally: maybe someone finds this usefull: - I use fluid to get the 
typoscript object into the template...



f:cObject typoscriptObjectPath=lib.backgroundImage / 


___
TYPO3-english mailing list
TYPO3-english@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english