Shortcodes put the blocks that need no attached items into any text where Omeka runs shortcodes: Simple Pages, the home page welcome text of RefBytes themes, and exhibit text blocks.
Write each shortcode on a line of its own. In a Simple Page, a shortcode alone in a paragraph is taken out of the paragraph, so its block is not nested in a <p>. Attribute values go in double quotes; they cannot contain a double quote (") or a closing square bracket (]), which would end the value or the shortcode.
[bs_search]
[bs_search scope="items" collection="1" heading="Search the collection" placeholder="posters, trail maps…" suggestions="Posters, Trail maps"]
| Attribute | Values |
|---|---|
scope |
site (default) or items |
collection |
A collection id (items only) |
heading, level |
Heading text; level 2 (default), 3 or 4 |
text |
A sentence above the field |
label, placeholder, button |
Field label (hidden when empty), placeholder, button label |
suggestions |
Suggested searches, separated by commas |
[bs_stats]
[bs_stats figures="{items}|Items; 56|Seasons|1938 to 1994; 412 in.|Snowfall in 1984–85" style="cards"]
figures lists the figures separated by semicolons; each is figure|label|description (the description is optional). {items}, {collections}, {exhibits}, {files}, {tags} and {featured} show live counts. Also heading, level, text, style (plain or cards) and align (center or start).
[bs_cta]
[bs_cta heading="Share your story" text="The library is collecting memories." button="Contact us" url="contact" button2="Read the story" url2="exhibits/show/the-story" background="accent"]
background is none, tint (default), primary, accent or dark; align is center or start. Links are full addresses or paths from the site root without a leading slash (contact, items/browse?tags=Posters).
[bs_items]
[bs_items tags="Posters" num="6" heading="Posters" more="See all posters"]
[bs_items ids="19,20,21,22" display="slider" heading="Tickets" body="none"]
Choose items with any of:
| Attribute | Values |
|---|---|
ids |
Item ids, separated by commas (ranges like 5-9 work); shown in this order unless sort is given |
collection |
A collection id |
tags |
Tags, separated by commas |
type |
An item type name or id, such as Still Image |
featured |
1 for featured items only |
num |
How many (default 12, up to 48) |
sort, order |
added (default, newest first), modified, title, date or random; order a or d |
and show them with:
| Attribute | Values |
|---|---|
display |
cards (default), list, featured or slider |
heading, level, text |
Heading, its level and a sentence above the items |
body |
description (default) or none |
more, more_url |
A "See all" button; without more_url it opens the items browse page with the same collection, tags, type or featured choice |
visible, autoplay, interval |
Slider only: cards in view (1–4), 1 for a slide show, seconds per step |
[bs_timeline]
A timeline of items, or of events you write yourself.
From items:
[bs_timeline type="Event" heading="Dates to remember" num="10"]
One event per item: its Dublin Core Date, its title (linked to the item) and a summary of its description. Items are chosen as for [bs_items] (default 20). sort="date" (default) orders them by date, sort="order" keeps the ids order; images="0" hides their images.
Written by hand, for dates that are not items:
[bs_timeline heading="Getting ready" events="June 8|Entry forms go out|Kids pick up entry forms at the Children's Desk.; June 27|Comic Jam|Bring your own pens.|events/comic-jam|Sign up"]
events lists the events separated by semicolons (;). Each event is up to five parts separated by vertical bars (|):
| Part | Content |
|---|---|
| 1. date | Shown as typed ("June 8", "Spring 1923"); machine dates (1938, 1952-12, 1963-12-14, 1949-01-07/1949-01-14) read as people write them, inside a <time> element |
| 2. title | The event's heading |
| 3. text | Optional, plain text |
| 4. link | Optional: a full address or a path from the site root (events/comic-jam); the event then ends with a Read more link |
| 5. link label | Optional: the link's text instead of "Read more" |
Leave a part empty to skip it (June 27|Comic Jam||events/comic-jam). An event needs a date or a title; empty entries are dropped. Written events keep the order you give them (sort="date" sorts them by their dates). When events is given, the item attributes (ids, collection, tags, type, featured, num) are ignored. heading, level and text work as for the other shortcodes.
To write a semicolon or a vertical bar inside a part, put a backslash before it: \; and \| (and \\ for a backslash). Like every attribute value, events cannot contain a double quote (") or a closing square bracket (]): use typographic quotes (“ ”) instead.
[bs_divider]
[bs_divider style="ornament" size="medium"]
style is ornament, line or space; size is small, medium or large.