...begins in wonder


navigation
home
email
github
mastodon
twitter
about
code, poetry, philosophy, folly (Andrew Kuklewicz)

Comatose Extensions

02 May 2007

comatose is a lovely terse cms that you can integrate into a web application - unlike other rails cms systems which are the application. Thing is, terse is great until you need something it does not do.

At PRX we wanted to be able to upload/resize/attach images and files, have a preview mode to see what the home page would look like before we publish parts of the content, and also we wanted to be able to access session info so we could make some content vary based on info in a user's session (this is also part of how the 'preview' mode works).

Folks on the forums also seem to be trying to figure this kind of thing out, so I humbly offer what I have gotten to work.

So without exposing all the work I am cleaning up on extending comatose, here is a bit of code showing how to add the session info to the comatose pages so it can be accessed and used.

As for the rest of my enhancements - well, I need to make it into a plugin I think, that gets installed on top of comatose. That will have to wait, as I am too busy adding enhancements at the moment to stop and package it....