Method: Comfy::CmsHelper#cms_snippet_content
- Defined in:
- app/helpers/comfy/cms_helper.rb
#cms_snippet_content(identifier, cms_site = @cms_site) ⇒ Object
Raw content of a snippet. Example:
cms_snippet_content(:my_snippet)
39 40 41 42 43 44 |
# File 'app/helpers/comfy/cms_helper.rb', line 39 def cms_snippet_content(identifier, cms_site = @cms_site) cms_site ||= cms_site_detect snippet = cms_site&.snippets&.find_by_identifier(identifier) return "" unless snippet snippet.content end |