Spree Commerce

Try It Now

- Static Content -


#Static Content

Good, clean content management of pages for Spree. You can use this to:

- Add and manage static pages such as an ‘About’ page.
- Show a static page instead of existing dynamic pages such as the home page,
products pages, and taxon pages.

To override a dynamic page, use the path of that dynamic page as the slug when
you create your page in the Spree Administration area, including the
leading slash. For example:

- to override the home page, use a path of ‘/’ (without quotes).
- to override a product page, use its path, e.g. ‘/products/apache-baseball-jersey’ (without quotes).

The dynamic page can be made available again if you delete the static page or change its slug.

Create your own copy of the `app/views/content/show.html.erb` template in your site
extension to change the layout of the static pages.

##Example to use the static pages inside a menu


    <% for page in Page.header_links do >
  • <= link_to page.title, page.link >

  • <
    end %>

  1. Installation

1. Add `gem “spree_static_content”` and `gem “spree_editor”, :path => “../../spree_editor”` to your Gemfile
1. Run `bundle install`
1. Run `rails g spree_static_content:install`
1. Run `rake db:migrate`
1. Run `rake spree_editor:install`

  1. NOTE: This is now an officially supported extension. The original extension was written by Peter Berkenbosch.


Comments

Dennis Warner said on May 02, 2011:

Your installation instructions are currently different than what is on git hub. The instructions here did not work for me, but the ones on github did. Should users be directed to github for installation instructions so you don't have to worry about them getting out of sync?

Dennis Warner said on May 02, 2011:

Even though this extension doesn't qualify as a full blown CMS (no menu admin), people searching for a CMS in the extension page may be plenty happy with the provided functionality. But this extension doesn't come up with searching for "cms." I feel it should.

Stewart Campbell said on July 16, 2011:

Wouldn't work for me until I added formtastic to my Gemfile, other than that really sweet extention - thanks very much.

Parker Morse said on December 13, 2011:

The gem requires Spree 1.0.x: " In Gemfile: spree_static_content depends on spree_core (>= 1.0.0.beta)" Any way to get gems that can work with 0.70.x?

Parker Morse said on December 13, 2011:

Figured it out. Neither the instructions here nor on Github work for 0.70.x right now. I had to use this line in Gemfile: gem 'spree_static_content', :git => 'git://raw.github.com/spree/spree_static_content.git', :branch => '0-70-stable'

Peter Grothe said on May 25, 2014:

Thanks! I added to my gemfile: gem 'spree_static_content', :git => 'https://github.com/spree/spree_static_content.git', :branch => '2-2-stable' seems to be working fine.

rajeev khangar said on August 01, 2014:

Hi, I am Rajeev. I am using gem 'spree_static_content', github: 'spree/spree_static_content', branch: '2-2-stable' into our rails application, now I want to put up the rails code into static pages. please suggest to me if you already have this feature.

Login to Comment.

LATEST

spree_weight_rates
by marcelo espina
asdfasdf
by asdfadf
spree_amazon_fps
by Ann Arbor T-shirt Co
spree_rdr_theme
by Akshay Singh
Wishlist
by Himadri Ganguly

CREATED BY

Rails Dog

Github

Stable Releases

Ext. Ver. Spree Ver. Actions
0.70.3 0.70.x Install   | Source
0.60.2 0.60.x Install   | Source
0.40.2 0.50.x Install   | Source
0.40.2 0.40.x Install   | Source

Dev Releases

Ext. Ver. Spree Ver. Actions
2.0.x - edge 2.0.x Show
1.3.x - edge 1.3.x Show
1.2.x - edge 1.2.x Show

NOTE:These instructions only apply to Spree version 2.0.x.

1. Add the following line to your Gemfile

gem 'spree_static_content', :git => 'git://raw.github.com/spree/spree_static_content.git', :branch => '2-0-stable'

2. Update your bundle by running:

$ bundle install

3. Refer to the extensions READme for further instructions:

http://github.com/spree/spree_static_content

NOTE:These instructions only apply to Spree version 1.3.x.

1. Add the following line to your Gemfile

gem 'spree_static_content', :git => 'git://raw.github.com/spree/spree_static_content.git', :branch => '1-3-stable'

2. Update your bundle by running:

$ bundle install

3. Refer to the extensions READme for further instructions:

http://github.com/spree/spree_static_content

NOTE:These instructions only apply to Spree version 1.2.x.

1. Add the following line to your Gemfile

gem 'spree_static_content', :git => 'git://raw.github.com/spree/spree_static_content.git', :branch => '1-2-stable'

2. Update your bundle by running:

$ bundle install

3. Refer to the extensions READme for further instructions:

http://github.com/spree/spree_static_content

NOTE:These instructions only apply to Spree version 0.70.x.

1. Add the following line to your Gemfile

gem 'spree_static_content', :git => 'git://raw.github.com/spree/spree_static_content.git', :ref => '1861f4cd08c0ffa9940f0c81e69ea29b4541dbbd'

2. Update your bundle by running:

$ bundle install

3. Refer to the extensions READme for further instructions:

http://github.com/spree/spree_static_content

NOTE:These instructions only apply to Spree version 0.60.x.

1. Add the following line to your Gemfile

gem 'spree_static_content', :git => 'git://raw.github.com/spree/spree_static_content.git', :tag => 'v0.60.2'

2. Update your bundle by running:

$ bundle install

3. Refer to the extensions READme for further instructions:

http://github.com/spree/spree_static_content

NOTE:These instructions only apply to Spree version 0.50.x.

1. Add the following line to your Gemfile

gem 'spree_static_content', :git => 'git://raw.github.com/spree/spree_static_content.git', :ref => '45b0050b96809c8fb0f21940f9407e9012a6d420'

2. Update your bundle by running:

$ bundle install

3. Refer to the extensions READme for further instructions:

http://github.com/spree/spree_static_content

NOTE:These instructions only apply to Spree version 0.40.x.

1. Add the following line to your Gemfile

gem 'spree_static_content', :git => 'git://raw.github.com/spree/spree_static_content.git', :ref => '45b0050b96809c8fb0f21940f9407e9012a6d420'

2. Update your bundle by running:

$ bundle install

3. Refer to the extensions READme for further instructions:

http://github.com/spree/spree_static_content