Method: ScrivitoHelper#scrivito_field

Defined in:
app/helpers/scrivito_helper.rb

#scrivito_field(obj, field_name) ⇒ Object

Note:

Content rendered using this method will not be editable in the Scrivito UI. If you want in-place editing, then please use #scrivito_tag instead.

Renders a field from the CMS.

Examples:

scrivito_field(@obj, :title)
scrivito_field(@obj, 'headline')

Parameters:

  • obj (Scrivito::BasicObj)

    an Obj, whose field should be rendered.

  • field_name (String, Symbol)

    the field of obj to be rendered.



253
254
255
# File 'app/helpers/scrivito_helper.rb', line 253

def scrivito_field(obj, field_name)
  scrivito_value(obj[field_name])
end