Skip to content

Instantly share code, notes, and snippets.

@maddesigns
Created August 29, 2013 12:15
Show Gist options
  • Save maddesigns/6377308 to your computer and use it in GitHub Desktop.
Save maddesigns/6377308 to your computer and use it in GitHub Desktop.
TYPO3 Snippet for Adaptive Images with <noscript> Sample: http://t3ip.maddesigns.de/examples/adaptive-images-noscript/
#adaptive images lib for TYPO3
lib.adaptive-images = COA
lib.adaptive-images {
1 = TEXT
1.value = <figure class="csc-textpic-imagecolumn###CLASSES###"><noscript
10 = IMG_RESOURCE
10 {
file.import.current = 1
file.maxW = 480
file.override.data = {$styles.content.imgtext.maxW}
stdWrap.noTrimWrap = | data-small="|" |
}
20 = IMG_RESOURCE
20 {
file.import.current = 1
file.maxW = {$styles.content.imgtext.maxW}
file.override.data = register:maxImageWidth
stdWrap.noTrimWrap = | data-large="|" |
}
30 = TEXT
30.data.current = 1
30.noTrimWrap = | data-alt="|" |
30.debug = 1
1000 = TEXT
1000.value = >|</noscript>###CAPTION###</figure>
}
tt_content.image.20 {
rendering {
singleNoCaption {
singleStdWrap.wrap.override.cObject < lib.adaptive-images
}
noCaption {
singleStdWrap.wrap.override.cObject < lib.adaptive-images
}
singleCaption {
singleStdWrap.wrap.override.cObject < lib.adaptive-images
}
splitCaption {
singleStdWrap.wrap.override.cObject < lib.adaptive-images
}
globalCaption {
singleStdWrap.wrap.override.cObject < lib.adaptive-images
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment