GeoHazardWatch

Page Actions


Using MediaPlugin

The MediaPlugin displays media library items — photos and videos — in a variety of formats: a total count, a linked list, a thumbnail grid, or a button linking to an album page. It integrates with the Media library and supports filtering by year, page association, or EXIF keyword. See Plugins for a complete list of available plugins.

Syntax

[{MediaPlugin}] renders as:

0

Parameters

ParameterDescriptionExampleDefault
formatOutput format: count, list, album, album-linkformat='album'count
keywordFilter by EXIF keyword tag; 'current' resolves to the current page namekeyword='Molly'None (all items)
pageFilter by page association; 'current' resolves to the current page namepage='TripToRome'None (all items)
yearFilter by year the media was takenyear='2023'None (all years)
maxLimit the number of items shownmax='12'No limit

Note: keyword, page, and year are mutually exclusive — only one filter is applied per plugin invocation. keyword takes precedence over page, which takes precedence over year.

Formats

format='count' (Default)

Renders the total number of media items matching the filter as plain text.

[{MediaPlugin}] renders as:

0

[This platform contains <span data-jspwiki-placeholder="cf5b4270-38"></span> media items.] renders as:

This platform contains 0 media items.

format='list'

Renders a bulleted list of media filenames, each linked to its detail page.

[{MediaPlugin format='list'}]
[{MediaPlugin format='list' keyword='Molly' max='10'}]
[{MediaPlugin format='list' year='2023'}]
[{MediaPlugin format='list' page='current'}]

Each item links to /media/item/<id>. Respects the max limit. If no items match, outputs an empty list.

format='album'

Renders a thumbnail grid of media items. Images show a 300×300 thumbnail; videos and other files show a placeholder icon.

[{MediaPlugin format='album' keyword='current'}]
[{MediaPlugin format='album' keyword="Molly's Cooking" max='24'}]
[{MediaPlugin format='album' year='2024' max='48'}]

Each thumbnail links to the media item detail page. If no items match, outputs No media items found.

format='album-link'

Renders a single button that links to the keyword album page. Requires keyword=.

[{MediaPlugin format='album-link' keyword='current'}]
[{MediaPlugin format='album-link' keyword='Family Reunion 2024'}]

The button label is <keyword> Album (N items) and links to /media/keyword/<keyword>. If keyword is omitted, outputs an error message.

The current Shorthand

Both keyword='current' and page='current' resolve to the name of the page where the plugin is placed. This makes it easy to create self-referencing pages without hard-coding a page name.

Example on a page named Molly:

Photos tagged with this page's name:
[{MediaPlugin format='album' keyword='current'}]

Count of media linked to this page:
[{MediaPlugin format='count' page='current'}]

The first plugin shows all media whose EXIF keywords include Molly. The second counts media explicitly linked to the Molly page.

Quoting Parameter Values

Use single quotes for simple values. For values that contain apostrophes, use double quotes:

[{MediaPlugin format='album' keyword="Molly's Birthday"}]

Difference Between keyword and page

FilterWhat it matches
keyword='X'Media whose **EXIF keyword tags** include X — set by the camera or in photo software
page='X'Media **manually associated** with page X — set in the media library interface

Use keyword for photos tagged in your photo management software; use page for media you've explicitly linked to a page.

See Media for browsing and managing the media library, Using ImagePlugin for embedding a single image, and Attachments for uploading files and images to pages.

No footnotes on this page.

No comments yet.