0.01
No commit activity in last 3 years
No release in over 3 years
Add comfortable mexican sofa CMS to spree commerce
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Project Readme

SpreeComfy

Build Status

Content management system based on comfortable-mexican-sofa for spree commerce. This is not a spree_static_content, it is a full-fledged CMS with image upload, page templates and a tree structure of content.

spree >= 3-6-stable

Installation

Gemfile:

# order is important
gem 'spree'
gem 'comfortable_mexican_sofa'
gem 'spree_comfy', branch: 'integrated', github: 'hazg/spree_comfy'
gem 'spree_auth_devise'

Run bundler:

bundle

Generate installs:

bundle exec rails generate comfy:cms
bundle exec rails generate spree_comfy:install
bundle exec rails generate spree:install --user_class=Spree::User

Now take a look inside your config/routes.rb file. You'll see where routes attach for the admin area and content serving. Make sure that content serving route appears as a very last item or it will make all other routes to be inaccessible.

mount Spree::Core::Engine, at: '/'
mount SpreeComfy::Engine, at: '/'

comfy_route :cms_admin, path: '/admin'
comfy_route :cms, path: '/', sitemap: false

Use

Render snippets:

= comfy_snippet('snippet-identifier')

Creating navigation: add category (for ex. "In top menu"), add {{ cms:page:menu_name:string }} to pages layout.

ul#top-menu
  - cms_site.pages.for_category('In top menu').each do |page|
    li
      - if not (label = cms_block_content('menu_name', page)).empty?
        a href=page.full_path =label
      - else
        a href=page.full_path =page.label

Auth with devise

https://github.com/hazg/spree_comfy_auth_devise

Copyright (c) 2014-2019 Aleksandr Aleksandrov, released under the New BSD License