Sha256: d60e443c22030f6a01c58cadffe8f22d724629ad841a48b396fddf5878339607

Contents?: true

Size: 1.14 KB

Versions: 4

Compression:

Stored size: 1.14 KB

Contents

Requirements
------------

Brightcontent

Installation
------------

Include the gem in your Gemfile:

```ruby
gem "brightcontent", :git => "git://github.com/stexy/brightcontent.git"
gem "brightcontent-pages", :git => "git://github.com/stexy/brightcontent-pages.git"
bundle install
```

Generate the initializer, copy migrations and edit routes file. This can be done via a generator. Migrate the database afterwards:

    $ rails generate brightcontent:install
    $ rails generate brightcontent:pages:install
    $ rake db:migrate

Go to `/admin` and login with default user (email: `admin@example.com` / password: `password`).


Usage
-----

Pages gives you a Page model with tree structure and pretty urls. Every page relates to a specific path. For example, you could create a page with the path `/about/team`. The page is available on the url via `current_page`.

This adds an extra layer on top of your existing routes. However when there aren't any routes available for the specific url, Rails cannot render the page. Therefore it is best to add a catch-all route (at the very bottom of the file) for all general pages:

```ruby
get "*path" => "pages#show"
```

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
brightcontent-2.0.0.alpha3 pages/README.md
brightcontent-pages-2.0.0.alpha3 README.md
brightcontent-2.0.0.alpha2 pages/README.md
brightcontent-pages-0.0.1 README.md