354 Understanding snippets, assets, and components

What are snippets, assets, and components?

Snippets, assets, and components are three tools in Omni CMS that allow for pre-formatted content to be displayed on a page. Each of these function slightly differently, and are used for different purposes.

Snippets Snippet icon

Snippets are pre-written HTML code that can be inserted into a page and modified as needed. You can think of a snippet as being a piece of HTML code that you can copy and paste into your page. Once the code is inserted, it is unique to that page, and can be edited as needed for that page. Efforts are made to make the snippet easy to edit in the editor, but due to the nature of HTML code, there may be instances where the underlying code may inadvertently be deleted while working in the editor. If that occurs, you can revert your page to a previous version. Snippets often look different in the editor than they do once the page is published, because the styling of the snippet is usually applied during the page publish process.

 

Assets Asset icon

Assets are pieces of content that are created and managed in one location, but may be inserted in multiple locations. They are helpful for managing pieces of content that should appear on multiple pages, because they can be maintained and edited in one location, and any changes made to the original asset will be published to any subscribing pages that also display that asset. Assets are also used for creating image galleries and sliders.

 

Components Component icon

Components are pre-formatted elements that can be inserted into a page, which are edited via an interactive form. Multiple of the same component type can be used on a single page. Once a component is inserted into a page, it is unique to that page, and can be edited separately from other components. Components are useful for editing content that has very specific styling, because it ensures that the styling is maintained even when the text, images, or links within the content change.

The underlying structure for components is maintained by the web team. If the web team makes adjustments to component structure (for example, adding a new field), those changes will populate to instances of that component across the site. However, the content that has been added to each individual component will not change.