[v4.0] Addressable Content Blocks

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

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"
end
  1. Add the following field to the _form.html.erb.
<%= f.input :slug, as: :path %>

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.