- 4 minutes to read

Snippets

New 7.11

Write a procedure, header, footer, or disclaimer once, and let every Article that needs it include it by reference — edit the Snippet, and every document that includes it shows the change immediately.

  • ✅ Reuse the same Markdown block across unlimited Articles, Templates, and Document Profiles
  • ✅ Update once, apply everywhere the Snippet is included
  • ✅ Turn any existing selection into a new Snippet without leaving the editor
  • ✅ Keep seeded and system tags off Snippets created from a selection

Understanding Snippets

A Snippet is its own document — it has a title, a slug, tags, and a Markdown body, just like an Article. What makes it a Snippet is how other documents use it: instead of copying its text, they include it by reference.

graph TD SnippetA[fa:fa-puzzle-piece Snippet: Standard Footer] ArticleA[fa:fa-newspaper Article A] ArticleB[fa:fa-newspaper Article B] SnippetPartC[fa:fa-list-check Document Profile: Snippet Part] ArticleA -- Includes --> SnippetA ArticleB -- Includes --> SnippetA SnippetPartC -- Shows --> SnippetA

One Snippet, included from two Articles and from a Document Profile's Snippet Part. Editing the Snippet updates all three the next time they're displayed.

Concept Behavior
Include token {nds}/<slug-or-id> in any Markdown body
Resolution timing Every time the document is displayed — not copied in at save time
Nesting A Snippet may include other Snippets
Reference target By slug or by id — both resolve to the same Snippet

Including a Snippet

Type the include token directly in Markdown, or use the Snippet picker to search and insert one without memorizing slugs:

  1. Place the cursor where the Snippet should appear
  2. Open the Snippet picker from the editor toolbar
  3. Search by title or tag
  4. Select the Snippet to insert its include token at the cursor

Snippet picker modal in the article editor with search results and preview (7.11)
Example of the Snippet picker with search results and a preview pane.

See the {nds}/standard-footer for contact details.

Example of a Snippet include token referencing a Snippet by its slug.

Create Snippet from Selection

Turn existing text into a reusable Snippet without leaving the document you're writing:

  1. Select the text to extract
  2. Choose Create Snippet from selection
  3. In Step 1: Details and Tags, provide title and slug, review content type, and optionally adjust tags — source tags are prefilled except reserved tag names
  4. Click Next
  5. In Step 2: Review and Create, confirm title, slug, type, tags, and content preview
  6. Click Create Snippet; the selected text is replaced with the new Snippet include token

Create Snippet from Selection modal step 1 with details, slug, tags, and selected text preview (7.11)
Step 1 of the Create Snippet from Selection modal: provide details and tags before moving to review.

Create Snippet from Selection modal step 2 review and create screen (7.11)
Step 2 of the Create Snippet from Selection modal: review values and create the new Snippet.

Replace Selection with Snippet

From the same editor action menu, choose Replace Selection with Snippet when the selected text already matches an existing Snippet. This opens the Snippet picker and inserts the selected Snippet reference in place of the current selection.

Article editor action menu showing Replace Selection with Snippet (7.11)
Use Replace Selection with Snippet to swap selected text for an existing Snippet reference.

Tag Merge

When you include a Snippet whose tags aren't already on the current document, a dialog offers to add the missing tags to the document you're editing:

Tag merge dialog offering to add missing snippet tags to the current document (7.11)
Example of the tag merge dialog after inserting a Snippet.

Reserved Tag Names

Some tags carry special meaning — for example, marking a Snippet as a seeded example — and shouldn't spread onto every Snippet an author creates from selected text. Reserved tag names (such as Template, Default, System) are never prefilled by Create Snippet from Selection, even if they're present on the source document.

The reserved list is administrator-editable through the ReservedArticleTagNames system parameter. Reserved tag names only affect the automatic prefill — an author can still add one manually, and Tag Merge is unaffected.

Seeded Example Snippets

Nodinite installs five example Snippets with the database, ready to copy or study: Standard Header, Standard Footer, Standard Copyright, Standard Next Step Section, and Standard Related Topics Section. Use them as a starting point for your own reusable content, or reference them directly from a Document Profile's Snippet Part.

Next Step