Sandstone Preview: Features
January 5, 2008 – 8:39 amOK, so I’ve explained a bit about what Sandstone is, and how it integrates with an existing Rails application (and how that results in better customizability and upgradeability). What exactly does it offer, though?
Starting with the basics, Sandstone is built around pages. Pages can be nested (using acts_as_tree), and have the standard attributes (path, content, title, and various bits of metadata). Sandstone enforces a simple workflow, where editors can create or edit pages that managers can then publish; editing a published page creates a new draft, to prevent changes from going live immediately. It also uses acts_as_versioned to handle the various drafts that are created. We have one Sandstone install using a WYSIWYG for the content, but the trunk version still uses straight HTML.
By default, pages use an included (customizable, of course) layout. Managers can create new layouts, however, that are then made available to editors for use on their pages. These page templates work just like a standard Rails layout - in fact, they are ERb templates, so you can use any embedded Ruby you like in them.
Both pages and page templates are cached to the filesystem (in app/views/pages/generated and app/views/layouts/generated, respectively) when they’re saved - and the cached versions of pages can actually be edited and saved to the filesystem independently of the web UI. This was intended to allow our designers (who are perfectly comfortable working with views of this sort) to make changes in their editor of choice, save them in the appropriate directory (and in source control), and have those changes picked up and saved to the database by Sandstone.
The plugin also gives you a sitemap by default - any pages created through Sandstone will automatically be added. Furthermore, if you specify a path that corresponds to a route already recognized in the system (like /categories, if you have a map.resources :categories in your routes file), Sandstone will recognize that and add an entry to the sitemap, but it won’t override your dynamic page.
Currently, the only roles in the system are editor and manager. As mentioned above, editors can create and edit pages. Managers can also work with pages directly, but they can also publish pages, manage page templates, and manage the user accounts that Sandstone recognizes.
So that’s what Sandstone currently does. Since it’s still under primary development, though, what might be more interesting is what’s on the roadmap - so that’s what I’ll talk about next time.

