Document! X 2022
Creating and Editing Content / Content Snippets
In This Topic
    Content Snippets
    In This Topic

    Content Snippets are named chunks of content that are defined in one place and included in many places in your project content. Content Snippets reduce duplication and promote reuse by making it easy for you to both define and reuse content.

    Content Snippet Fundamentals

    To define a new Content Snippet from some existing content

    1. Open the Topic or Content File containing the content that you would like to convert to a Content Snippet.
    2. Select the content you wish to convert.
    3. Drag and Drop the content onto the Content Snippets window.
       
        or
       
      Right click and select Create Content Snippet from the context menu.
    4. When prompted, define a Name for the Content Snippet.

    A new Content Snippet will be created containing the content that you selected and will appear in the Content Snippets list. The original content will be replaced by a reference to the Content Snippet.

    To create a new Content Snippet

    1. In the Content Snippets window, right click the root Content Snippets node.
    2. Select New Content Snippet from the context menu.
    3. When prompted, define a Name for the new Content Snippet.

    The new Content Snippet will be opened for edit and will appear in the Content Snippets list.

    To use a Content Snippet

    1. Open the Topic or Content File into which you would like the Content Snippet included.
    2. Drag and Drop the Content Snippet that you want to include from the Content Snippets window into the Topic editor.
       
        or
       
      Right click in the content editor at the position you wish to insert the Content Snippet and select Insert Content Snippet from the context menu.

    A reference to the Content Snippet will be inserted into the content. When you Preview or build the Help System the Content Snippet reference will be replaced with the full content of the Content Snippet. 

    To edit a Content Snippet

    1. In the Content Snippets window, select the Content Snippet that you wish to edit.
    2. Right click and select Edit to open the snippet for edit.

    The Content Snippet will be opened in a special version of the Topic Editor so all of the usual authoring functionality is available.

    To remove a Content Snippet

    1. In the Content Snippets window, Select the Content Snippet that you wish to remove.
    2. Right click and select Delete from the context menu.
    See Also