Content > Snippets

Steps to document:

  1. ‘Content’ > ‘Snippets’
  2. A brief description of what a Snippet is and typically used for (maybe use case example)
  3. “Add New Snippet” button
  4. “Search” function
  5. List items and actions: ‘Sort column’, ‘Duplicate’, ‘Edit’, ‘Delete’, ‘Bulk delete’

Editing item:

  1. ‘Name’, ‘Alias’, ‘Enabled’
  2. Content area: ‘Code View/WYSIWYG’, ‘File Manager’, ‘Component manager’ (just briefly, separate article on using the editor, etc.)
  3. “Save”
  4. “Delete”

— END —

@Adam.Wilson Can we add an example of passing a custom param to a snippet. Or maybe we just need a central article on custom parameters under Liquid Objects and usage, that we could link all the modules’ custom parameter section to.

Title:
Custom Parameters

Description:

Custom parameters can be used with most components and allow the passing of a custom parameter into an instance of a component. This custom parameter can be used to customize an instance of a module/component insertions. For example a custom parameter could be used in a CSS class to affect the styling of a component instant, or it could be used in the logic of a component to show or hide specific parts of a layout.

In this example we’re inserting a snippet component with the custom parameter called “color” and assigning the value of “blue” to a snippet.

{% component type: "snippet", alias: "footer_snippet", color: "blue" %}

Then in the layout we get the value of color and use it as a CSS value:

<p class="{{params.color}}">Some content</p>
1 Like

Hi @Alex_B_Centrifuge
Great idea and thanks for the write-up. I’ll implement this shortly!
:+1: