Skip to content

Instantly share code, notes, and snippets.

@rob-ot-dot-be
Created November 12, 2012 20:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rob-ot-dot-be/4061599 to your computer and use it in GitHub Desktop.
Save rob-ot-dot-be/4061599 to your computer and use it in GitHub Desktop.
Dynamic background-image stylesheet with image ffrom media field TYPO3
css = PAGE
css {
typeNum = 22
config {
additionalHeaders = Content-type: text/css
disableAllHeaderCode = 1
}
stdWrap.required = 1
stdWrap.wrap = |
10 = TEXT
10.value (
.content_header_pic {
)
20 = TEXT
20.data = levelmedia: -1
20.listNum = 0
20.wrap = background: url('uploads/media/|');
30 = TEXT
30.value (
border-top: 8px solid #0D337A;
height: 105px;
width: 100%;
}
)
30.if {
isTrue.data = levelmedia: -1
}
}
[...]
page = PAGE
page {
headerData {
16 = TEXT
16.dataWrap = <link rel="stylesheet" type="text/css" href="index.php?id={field:uid}&type=22" />|
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment