[v4.0] Addressable Content Blocks

Jamela Black edited this page Aug 2, 2014 · 1 revision
Clone this wiki locally

Addressable Content Blocks

Content blocks can created with as their own pages. To make a block addressable, a developer must do the following:

  1. Add is_addressable to the model. This will automatically generate a :slug form field when creating/editing instances.
  2. Set the Page Template that should be used (defaults to 'default').
class Product < ActiveRecord::Base
  is_addressable path: "/products", template: "product"
  1. Add the following field to the _form.html.erb.
<%= f.input :slug, as: :path %>