Sha256: 8d690e15275c69497c9bfa8c96722fbd8520a54ed696c1e6d68248a39919c5c0

Contents?: true

Size: 667 Bytes

Versions: 9

Compression:

Stored size: 667 Bytes

Contents

class <%= page_name.classify %>ShowSlice < Slice
  restricted_slice

  # A "show slice" is handy if every page in a set will have the same
  # fields defined up on them, and no slices will be involved in the
  # display of the page. Append it to the set page's entry_content.slices.
  #
  # Here's an example of how to give the slice the ability to access the
  # copy field on the <%= page_name %>'s content document:
  #
  # attr_reader :copy
  #
  # def prepare(params)
  #   @copy = page.content[:copy]
  # end
  #
  # Don't forget to add each field to the as_json method in <%= page_name %>.rb
  # if you want to be able to edit the fields in the admin UI.
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
slices-2.0.2 lib/generators/slice/templates/show_slice.rb
slices-2.0.1 lib/generators/slice/templates/show_slice.rb
slices-2.0.0 lib/generators/slice/templates/show_slice.rb
slices-1.0.5 lib/generators/slice/templates/show_slice.rb
slices-1.0.4 lib/generators/slice/templates/show_slice.rb
slices-1.0.3 lib/generators/slice/templates/show_slice.rb
slices-1.0.2 lib/generators/slice/templates/show_slice.rb
slices-1.0.1 lib/generators/slice/templates/show_slice.rb
slices-1.0.0 lib/generators/slice/templates/show_slice.rb