What is a Snippet?
A
snippet in ScrewTurn Wiki is a reusable, programmable block that allows you to insert dynamic or custom content into a wiki page using special syntax. Snippets are a core extension mechanism that let you go beyond plain text and include features like:
- Image galleries
- Video embedding
- Automatically generated content (e.g., mission lists, squadron data)
- Form elements or special layouts
- Links to external resources (PDFs, YouTube, etc.)
Snippets can accept
parameters and behave similarly to template tags in other wiki systems.
How Snippets Work
A snippet is typically written like this:
{s:SnippetName|param1|param2|...} Example
{s:YouTube|abcd1234|640|360}
This would embed a YouTube video with the specified ID and dimensions.
Some snippets do not take any parameters. Others may require multiple, and the order of parameters is important — they are positional, not named.
Types of Snippets
Snippets in this wiki can generally be grouped into a few categories:
- Content Formatting
- {s:Accordion}, {s:FloatBox}, {s:CorneredImage}, {s:ModalWindow}
- Data-Driven Content
- {s:MemberMissionList}, {s:AircraftBySquadronList}, {s:MissionPage}
- Media Embeds
- {s:YouTube}, {s:AlbumImage}, {s:ImageCard}
- Utility / Navigation
- {s:WikiNav}, {s:TopicNav}, {s:ForumNav}
- Forms & Interaction
- {s:DonationForm}, {s:SendMail}, {s:Join_or_Donate}
Notes on Usage
- Snippets are parsed and rendered dynamically when the page is displayed.
- Providing incorrect or missing parameters may result in rendering errors or broken functionality.
- Some snippets only display content; others interact with data sources or file uploads.
- Snippets are typically defined in the site’s code base or added via extensions or plugins.
Summary
Snippets are a flexible, powerful way to make ScrewTurn Wiki pages dynamic and modular. They can:
- Insert complex or automated content
- Be reused across pages
- Accept parameters for customization
- Be used in combination for advanced layouts or displays
See the
Snippets Reference page for a full list of available snippets and how to use them.