Templates: Juneindex: fileimage

This documentation was updated on Tuesday, April 21, 2009 at 9:05 AM

Inserts a thumbnail if the file is an image. It must appear inside of a <juneindex:files> tag. The image will be wrapped in a <div> with the specified class name. Your server must have GD1, GD2, or ImageMagick installed for this to work correctly. See the manual for more information.

Attributes

class: any CSS class name. The default is “image”.
width: the maximum width of the thumbnail image in pixels. The default is “80”.
height: the height of the thumbnail image in pixels. The default is “80”, or the width if one was set.
fullwidth: the maximum width, in pixels, of the pop-up image that’s displayed when the smaller thumbnail image is clicked. The default is to display the full size image.
fullheight: the maximum height, in pixels, of the pop-up image that’s displayed when the smaller thumbnail image is clicked. The default is to display the full size image.
popup: true or false. True will open a popup window for images that can be displayed directly in a web browser. False will always link directly to the file. The default is true.
title: text to display below the enlarged image when the thumbnail is clicked on.
href: an alternate URL to link to. If one is given then the full size image will not be displayed, and the popup attribute will be ignored. Set href=”“ if you don’t want the thumbnail image to be clickable at all.
crop: true, false, or a set of four coordinates separated by commas. The four coordinates are width, height, left offset, and top offset. When set to true the thumbnail image will be cropped to match the width and height exactly, showing as much of the image as possible in that area. If four coordinates are given, the image will be cropped to that area, showing as much as possible within the given thumbnail size. The default is false, which shows the entire image no larger than the specified size. Specifying coordinates requires ImageMagick.
overlay: an image to overlay on top of the thumbnail image. This is useful for adding borders or watermarks. It is recommended that you specify a PNG image that uses alpha transparency. The path should be relative to your site’s root document folder. This feature requires ImageMagick.

Example

<juneindex:fileimage width="200" height="300" class="thumbnail" popup="false" />

Changes

The title, popup, and href attributes were added in version 3.0 beta 2. The crop and overlay attributes were added in version 3.1. The fullwidth and fullheight attributes, and the option to set href=”“, were added in Juneindex 3.2.

You are here: Junecode: about: design templates: juneindex: fileimage
This site was created with Junecode. Copyright © 2010–2023 Junecloud LLC.