]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/contrib/ikiwiki/directive/album.mdwn
ikiwiki (3.20130711) unstable; urgency=low
[ikiwiki.git] / doc / plugins / contrib / ikiwiki / directive / album.mdwn
1 The `album` directive is supplied by the [[!iki plugins/contrib/album desc=album]] plugin.
2
3 Each page containing an `album` directive is treated as a photo album
4 or image gallery. Example usage is as simple as:
5
6     \[[!album]]
7
8 Every image attached to an album or its [[subpages|ikiwiki/subpage]] is
9 considered to be part of the album. A "viewer" page, with the wiki's default
10 page extension, will be generated in the
11 [[transient underlay|plugins/transient]] to display the
12 image, if there isn't already a page of the same name as the image: for
13 instance, if `debconf` is an album and `debconf/tuesday/p100.jpg` exists,
14 then `debconf/tuesday/p100.mdwn` might be created.
15
16 The album is treated as a [[!iki plugins/contrib/trail desc=trail]], which
17 gives each viewer page a link back to the album, and a link to the previous
18 and next viewer in the album.
19
20 The `album` directive also produces an [[ikiwiki/directive/inline]] which
21 automatically includes all the viewers for this album, except those that
22 will appear in an [[albumsection]]. If every image in the album is in a
23 section, then the `album` directive is still required, but won't produce
24 any output in the page.
25
26 The `inline` can include some extra information about the images, including
27 file size and a thumbnail made using [[ikiwiki/directive/img]]). The
28 default template is `albumitem.tmpl`, which takes advantage of these things.
29
30 ## Options
31
32 The directive can have some options for the entire album. The defaults are:
33
34     \[[!album
35       sort="-age"
36       size="full"
37       thumbnailsize="96x96"
38       viewertemplate="albumviewer"
39       prevtemplate="albumprev"
40       nexttemplate="albumnext"
41
42 * `sort` - sets the order in which images appear, defaulting to earliest
43   creation date first
44 * `size` - if not `full`, the [[ikiwiki/directive/img]] in the viewer page
45   will be resized to be no larger than this
46 * `thumbnailsize` - the [[ikiwiki/directive/img]] in the album page,
47   which can also be used in the previous/next links, will be no larger than
48   this
49 * `viewertemplate` - the template used for the [[albumimage]] in each
50   viewer page
51 * `prevtemplate` - the template used to replace `<TMPL_VAR PREV>` if used in
52   the viewer page
53 * `nexttemplate` - the template used to replace `<TMPL_VAR NEXT>` if used in
54   the viewer page
55
56 [[!meta robots="noindex, follow"]]