Inhaltsverzeichnis
keine Gliederung
/* * ImageSlideshow Dekiscript Template * * by Bryan Nelson 16 May 2009 * * {{ template.ImageSlideshow( path : uri ?, width: number ?, height: number ?) }} * path : URI path to page with image attachements; Optional; Default = page.path * width: Image width, Optional; Default = 320 * height: Image height, Optional; Default = 240 * * This template inserts a table of thumbnails (with name and description) of all the * images attached to a particular page.for the a page. If a page is not sepecified then the * current page is used. If the number of columns are not specified then 3 is default. * * Work based on examples at * http://developer.mindtouch.com/index.php?title=DekiScript/FAQ/How_do_I..._Embed_an_image_slideshow%3F&highlight=image+slideshow * * This template uses my preferred method of writing Dekiscript in the text editor and not * the source editor to keep code formatting. * */ var pics = map.values(wiki.getpage($0 ?? $path ?? page.path).files ?? { }); let pics = list.select(pics, "string.startswith($.mime, 'image/')"); let pics = list.collect(pics, "uri"); var webviewpics; foreach(var pic in pics) { let webviewpics = webviewpics .. [ (pic .. "?size=webview") ]; } if(#pics > 0) { image.slideshow(webviewpics, $1 ?? $width ?? 640, $2 ?? $height ?? 480, 5, "fade"); }
Kommentare