Skip to content

Instantly share code, notes, and snippets.

@drucko
Created April 4, 2013 17:44
Show Gist options
  • Save drucko/5312453 to your computer and use it in GitHub Desktop.
Save drucko/5312453 to your computer and use it in GitHub Desktop.
Background-Images via TypoScript With IMG_RESOURCE you can manipulate an IMAGE via TYPO3 without outputting the whole img-Tag. IMG_RESOURCE creates an Image in typotemp (f.e. typo3temp/pics/134e7c7dd2.jpg). So you can use it then as an background-image.
page.90 = IMG_RESOURCE
page.90.file = fileadmin/Dog.jpg
page.90.file.width = 100
page.90.file.height = 100
page.90.stdWrap.wrap (
<div style="background-image:url(|); width:100px; height:100px;">Headline</div>
)
This is the result:
<div style="background-image:url(typo3temp/pics/134e7c7dd2.jpg); width:100px; height:100px;">
Headline
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment