[TYPO3-english] Image Content Element as Body Background

Scotty C superscotty19 at yahoo.com
Thu Jul 24 20:25:12 CEST 2014


Hi,

First and foremost, thanks for the quick reply! Unfortunately that won't 
work because I don't have an exact path. All I know is, the user will pick 
"some" image from fileadmin and place it in the left column as an image 
content element.

Can we tweak something to still make your suggestion work?

Thanks again,
-Scott.




Sent with AquaMail for Android
http://www.aqua-mail.com


On July 24, 2014 11:50:03 AM JoH asenau <info at cybercraft.de> wrote:

> Am 24.07.2014 18:16, schrieb Scotty C:
> > Hi again everyone,
> >
> > I'd like to take an image content element, supplied by the user in a
> > reserved column, and make it the background of the HTML body tag. My
> > (very rough) thinking is:
> >
> > Page.10 = IMAGE
> > page.10.value < styles.content. getleft
> > Page.Bodytag = <body style="background-image: url( THE IMAGE FROM ABOVE
> > GOES HERE);">
>
> You are on the right track, but using styles.content.getLeft won't help
> here, since it will return <img> tags where you actually just want the URL.
>
> page.bodyTagCObject = TEXT
> page.bodyTagCObject {
>    value = path/to/my/default/image.jpg
>    override.cObject = CONTENT
>    override.cObject {
>      table = tt_content
>      select {
>        where = colPos = 1
>        max = 1
>      }
>      renderObj = IMG_RESOURCE
>      renderObj {
>        #image setup here
>      }
>    }
>    wrap = <body style="background-image:url(|);">
> }
>
> "Image setup here" depends on the method you are using to upload and
> save the image.
> You will find several resources on how to render it correctly :-)
>
> HTH
>
> Joey
>
>
> --
> Wenn man keine Ahnung hat: Einfach mal Fresse halten!
> (If you have no clues: simply shut your gob sometimes!)
> Dieter Nuhr, German comedian
> Xing: http://contact.cybercraft.de
> Twitter: http://twitter.com/bunnyfield
> TYPO3 cookbook (2nd edition): http://www.typo3experts.com
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english




More information about the TYPO3-english mailing list