- 6 minutes to read

Snippets

New 7.11

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

  • ✅ Reuse the same block of text 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 or HTML body, just like an Article. Snippets are listed under Repository > Snippets. 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}/ followed by the Snippet's slug, for example {nds}/std-footer
Reference target The slug only. A token with an id, such as {nds}/27540, isn't resolved and is reported as an issue, because ids differ between environments while slugs travel with an export
Resolution timing Every time the document is displayed — not copied in at save time
Nesting A Snippet may include other Snippets, up to 5 levels deep. A Snippet that includes itself, directly or in a loop, is cut and reported
Macros Resolved for the document that includes the Snippet — see the Macros Reference
Inline icons A Snippet's text can hold {ndx} icons from Insert Icon, the same icons as Component Types (requires a Mapify license) — see Inline Icons with
Broken references A missing or deleted Snippet is flagged in the Reference Explorer, under Relationships in the reader
Deleting A Snippet that a document includes can't be permanently deleted until the reference is gone

Including a Snippet

Type the include token directly, or click Insert Snippet to find one without memorizing slugs. The button sits in the toolbar of the HTML editor and above a Markdown editor, and the editor's right-click menu has it too.

Insert the shipped Standard Footer Snippet into an Article, animated walkthrough (7.12)
Animated walkthrough: click Insert Snippet, filter on the title, click Use on Standard Footer, save, and read the Article with the shared footer.

  1. Place the cursor where the Snippet should appear
  2. Click Insert Snippet
  3. Type in the filter to match the title, or use Filter on Tag
  4. Click Use on the Snippet; its include token is inserted at the cursor, and the preview shows the Snippet's text
  5. Click Save

Insert Snippet dialog filtered on Standard Footer, with its slug std-footer and the Use button (7.12)
The Insert Snippet dialog lists the matching Snippets with their slug and tags. Click Use to insert one.

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

Example of an include token for the shipped Standard Footer Snippet, by its slug.

Create Snippet from Selection

Turn existing text into a reusable Snippet without leaving the document you're writing. This works in a free-form Article, Snippet, or Template; a section of a Document Profile-based Article has Insert Snippet in its own toolbar, but no right-click menu.

Turn selected Article text into a new Snippet, animated walkthrough (7.12)
Animated walkthrough: select the text, right-click, Create Snippet from Selection, fill in the details, Next, and Create Snippet.

  1. Select the text to extract
  2. Right-click the selection and choose Create Snippet from Selection
    Editor right-click menu on selected text with Create Snippet from Selection highlighted (7.12)
    The right-click menu: Insert Image from Library, Insert File from Library, Insert Article Link, Insert Snippet, Insert Icon, Create Snippet from Selection, and Replace Selection with Snippet.
  3. In Details and Tags, check the Title (suggested from the selection) and the Slug that follows it, and optionally adjust the Tags. The document's tags are prefilled, except reserved tag names. Content Type is read-only: the new Snippet keeps the Content Type of the editor you selected the text in, HTML or Markdown.
  4. Click Next
  5. In Review and Create, confirm the title, slug, type, tags, and content preview
  6. Click Create Snippet; the selected text is replaced with the new Snippet's include token

Create Snippet from Selection, Details and Tags, with Title, Slug, Content Type HTML, the tags orders and runbook, and the Selected Text (7.12)
The first step, Details and Tags: the Title, Slug, tags, and the selected text.

Create Snippet from Selection, Review and Create, with the title, slug, type, tags, and content preview (7.12)
The second step, Review and Create: check the values and click Create Snippet.

You need Create rights on Articles. The new Snippet is listed under Repository > Snippets.

Replace Selection with Snippet

From the same right-click menu, choose Replace Selection with Snippet when the selected text already matches an existing Snippet. It opens the Insert Snippet dialog, and the Snippet you pick replaces the selection with its include token.

Replace selected Article text with an existing Snippet, including the tag merge, animated walkthrough (7.12)
Animated walkthrough: select the text, right-click, Replace Selection with Snippet, filter, click Use, and add the Snippet's tag to the Article.

Tag Merge

When a Snippet has tags that the document you're editing lacks, Apply Snippet Tags opens before the Snippet is inserted. It comes up for Insert Snippet, Replace Selection with Snippet, and Create Snippet from Selection. Each missing tag has a checkbox, ticked by default:

  • Add Selected Tags adds the ticked tags to the document and inserts the Snippet.
  • Close cancels an insert or a replace. After Create Snippet from Selection, the Snippet already exists, so it's inserted anyway.

Apply Snippet Tags dialog for the Snippet Contoso server contacts, with the tag contacts ticked (7.12)
The Apply Snippet Tags dialog: pick the Snippet's tags to add to the Article.

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, which holds Template;Default;System by default. 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, with the slugs std-header, std-footer, std-copyright, std-next-step, and std-related-topics. Use them as a starting point for your own reusable content, or reference them directly from a Document Profile's Snippet Part. New 7.12 The Standard Footer shows {{ customername }} · {{ environmentname }} · Nodinite {{ product.version }}, and the Standard Copyright reads © {{ year }} {{ customername }}. All Rights Reserved. (see Macros Reference).

New 7.12 These Snippets are marked Shipped by Nodinite and are locked: you can't edit or delete them, and every Nodinite upgrade updates them in place. To change one, clone it and use the copy. Changes made to them before 7.12 are overwritten by the upgrade, so clone an edited one before you upgrade. See Shipped by Nodinite.

Building Blocks Generated from BizTalk

New 7.12 Generate Articles from BizTalk writes one Snippet per BizTalk port, orchestration, pipeline, and map: a Building Block. Integration Articles include them, so a shared artifact is described once. The facts are generated and locked; the Notes section is yours, and a note you write shows in every Article that includes the Building Block. See BizTalk Document Profiles and Section Keys.

Next Steps