0%

Snippets ID: DBT-HUCO-SNPT

Marketpath CMS Snippets are simple HTML objects that can be used for many different purposes. Snippets can be a helpful tool both for developers and content editors. Re-using snippets across a site can improve consistency and maintainability.

Standard Fields

A Marketpath CMS Snippet has the following default fields.

  • Name
  • Folder
  • Content
  • Tags

Outputting Snippets

Use the following code snippet to output a snippet's content. This will output the raw HTML in the editable snippet Content field. 

{% snippet output_to_html = "CTA1" %}

Other Considerations

Generally speaking, if you find yourself copying the same content into multiple HTML fields, you should consider replacing the field with a snippet. This makes it easy to edit that content once and instantly apply your changes everywhere that it is located. If you find yourself commonly creating snippets that are only displayed on a single page, consider changing it to an HTML field which will simplify page creation and maintenance by making all content editable directly from the page edit interface.

 



Feedback?

Please fill out the form below with your feedback or any questions you may have after working through the "Snippets" lesson.

Your Name
Email 
Feedback / Questions