

Following snippet creates a simple image gallery where the images are read from the media field.
If on the actual page are no images, this snippet searches the rootline until it finds some.
Every image is beeing displayed as thumbnail and if you click on it the scaled image is shown with javascript.
temp.imgbar=COA # first smal image temp.imgbar.20.5.stdWrap.wrap=<div class="imgsmall"><img onClick="document.getElementById('imgbig').src='|'" src= temp.imgbar.20.5=IMG_RESOURCE temp.imgbar.20.5.file { import.data = levelmedia: 9,slide import = uploads/media/ import.listNum = 0 file.width=392 file.height=260 } temp.imgbar.20.10=IMG_RESOURCE temp.imgbar.20.10.stdWrap.wrap="|"></div > temp.imgbar.20.10.file { import.data = levelmedia: 9,slide import = uploads/media/ import.listNum = 0 width = 123 height= 83 } # the big image temp.imgbar.10<temp.imgbar.20.10 temp.imgbar.10=IMG_RESOURCE temp.imgbar.10{ file.import.listNum = 0 file.width=392 file.height=260 stdWrap.wrap= <div class="imgbig" style="float: right;"><img id="imgbig" src="|" height="260" width="392" alt="" /></div> } # 2. small image temp.imgbar.30<temp.imgbar.20 temp.imgbar.30.10{ stdWrap.wrap= "|"> file.import.listNum = 1 } temp.imgbar.30.5.file.import.listNum=1 #3. smal image temp.imgbar.40<temp.imgbar.30 temp.imgbar.40.10{ file.import.listNum = 2 } temp.imgbar.40.5.file.import.listNum=2
Visual example for simple imagegallery from media field




Add comment