Skip to content

Instantly share code, notes, and snippets.

@rpflamm
Last active September 1, 2016 13:04
Show Gist options
  • Save rpflamm/9b71498079e0dc205d3e367fe774d8b1 to your computer and use it in GitHub Desktop.
Save rpflamm/9b71498079e0dc205d3e367fe774d8b1 to your computer and use it in GitHub Desktop.
randomImage from Directory
lib.randomImages = COA
lib.randomImages {
10 = LOAD_REGISTER
10 {
images.cObject = FILES
images.cObject {
folders = 1:user_files/zufallsbilder/
renderObj = TEXT
renderObj {
data = file:current:uid
stdWrap.wrap = |, |*| |, |*| |
}
}
}
20 = FILES
20 {
files.data = register:images
files.listNum = rand
renderObj = IMAGE
renderObj {
file.import.data = file:current:uid
file.import.listNum = rand
stdWrap.typolink.parameter.data = file:current:link
altText.data = file:current:alternative
titleText.data = file:current:title // file:current:alternative
stdWrap.wrap = <div class="randomimage">|</div>
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment