wearefine/fae

Adding pages to the cms that don't manage models

asecondwill opened this issue · 1 comments

I'd like to add an analytics page, or maybe series of pages with reports. Is there a recommended way of doing that? I suppose I really just need somewhere to put a controller and a view that uses the fae application layout.

So solved that; use Fae::ApplicationController, not BaseController, obviously.

/controllers/admin/reports_controller.rb

module Admin
  class ReportsController < Fae::ApplicationController
    def analytics
      # add report code
      @page_title = "Analytics"
    end  
  end
end

routes.rb

namespace :fae do
      get 'analytics', to: 'reports#analytics'
  end

and add view:
/app/views/admin/reports.slim