# New ajaxy CMS on Rails: adminpages

**URL:** <https://www.ruby-forum.com/t/new-ajaxy-cms-on-rails-adminpages/78596>\
**Category:** Rails\
**Created:** [March 8, 2006, 7:28pm UTC](https://www.ruby-forum.com/t/new-ajaxy-cms-on-rails-adminpages/78596 "2006-03-08T19:28:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![msojka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@msojka](https://www.ruby-forum.com/u/msojka)\
**Post date:** [March 8, 2006, 7:28pm UTC](https://www.ruby-forum.com/t/new-ajaxy-cms-on-rails-adminpages/78596/1 "2006-03-08T19:28:02Z")

</div>

hey, i’ve created a basic content management system using rails and  
scriptaculous. I posted a first version last week, but I heavily  
extended it since then.

Features:  
Pages are arranged in a sortable tree (sortable by drag and drop)  
Pages have “nice” URLS (no /index?articleid=97361496 or something)  
Cacheing on page basis  
every page has a layout with a number of columns  
page elements can be put into the columns by drag and drop (sortable  
lists)  
Each page element has its own view and controller. Up to now I have  
created Title, raw HTML, rich text editor and rails component, but  
adding your own elements should be easy

You can check it out under [http://adminpages.flowdev.de](http://adminpages.flowdev.de)

Source: [http://www.flowdev.de/adminpages\_0.2.tar.gz](http://www.flowdev.de/adminpages_0.2.tar.gz)

Of course there are many rough edges, but come on, second version!

And yes, it is BSD licensed. I would love it if any of you are  
interested in joining me in the development. Mail me, then I will put it  
on rubyforge

Cheers,  
Martin (Username wooyay on #rubyonrails)

---

<div class="post-metadata">

**Author:** ![msojka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@msojka](https://www.ruby-forum.com/u/msojka)\
**Post date:** [March 8, 2006, 11:46pm UTC](https://www.ruby-forum.com/t/new-ajaxy-cms-on-rails-adminpages/78596/2 "2006-03-08T23:46:34Z")

</div>

Martin S. wrote:

> hey, i’ve created a basic content management system using rails and  
> scriptaculous. I posted a first version last week, but I heavily  
> extended it since then.
> 
> Features:  
> Pages are arranged in a sortable tree (sortable by drag and drop)  
> Pages have “nice” URLS (no /index?articleid=97361496 or something)  
> Cacheing on page basis  
> every page has a layout with a number of columns  
> page elements can be put into the columns by drag and drop (sortable  
> lists)  
> Each page element has its own view and controller. Up to now I have  
> created Title, raw HTML, rich text editor and rails component, but  
> adding your own elements should be easy
> 
> You can check it out under [http://adminpages.flowdev.de](http://adminpages.flowdev.de)

That looks quite usable, nice interface!  
I will take a look at the code.  
Stan

---

<div class="post-metadata">

**Author:** ![msojka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@msojka](https://www.ruby-forum.com/u/msojka)\
**Post date:** [March 9, 2006, 3:25am UTC](https://www.ruby-forum.com/t/new-ajaxy-cms-on-rails-adminpages/78596/3 "2006-03-09T03:25:48Z")

</div>

Hello Martin,

Very nice work on what you have so far - it’s amazing at what can be  
accomplished with little added code with Rails, still gets me every  
time…

Best I get to the point eh? What I wanted to remind you of is to post  
on  
the Rails Wiki - Your work with this, if you haven’t already. I just  
looked  
and hope that I didn’t somehow miss it.

[http://wiki.rubyonrails.org/rails/pages/Ruby+on+Rails+based+CMS](http://wiki.rubyonrails.org/rails/pages/Ruby+on+Rails+based+CMS)

---

<div class="post-metadata">

**Author:** ![msojka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@msojka](https://www.ruby-forum.com/u/msojka)\
**Post date:** [March 9, 2006, 10:29am UTC](https://www.ruby-forum.com/t/new-ajaxy-cms-on-rails-adminpages/78596/4 "2006-03-09T10:29:14Z")

</div>

It is very nice and useful too. Only problem I have is this:  
I created a simple table for news. I also created the controller and  
views using scaffold. But when I try to “add render component” I get an  
error that controller news with action list does not exit.

Martin S. wrote:

> lists)  
> And yes, it is BSD licensed. I would love it if any of you are  
> interested in joining me in the development. Mail me, then I will put it  
> on rubyforge
> 
> Cheers,  
> Martin (Username wooyay on #rubyonrails)

–  
Alexander A.  
Information Systems Department  
Mediterranean Agronomic Institute of Chania  
Tel.: +30 28210 35000 718  
Email: removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![msojka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@msojka](https://www.ruby-forum.com/u/msojka)\
**Post date:** [March 9, 2006, 1:31pm UTC](https://www.ruby-forum.com/t/new-ajaxy-cms-on-rails-adminpages/78596/5 "2006-03-09T13:31:31Z")

</div>

Joe ManFoo wrote:

> Hello Martin,
> 
> Very nice work on what you have so far - it’s amazing at what can be  
> accomplished with little added code with Rails, still gets me every  
> time…
> 
> Best I get to the point eh? What I wanted to remind you of is to post  
> on  
> the Rails Wiki - Your work with this, if you haven’t already. I just  
> looked  
> and hope that I didn’t somehow miss it.
> 
> [http://wiki.rubyonrails.org/rails/pages/Ruby+on+Rails+based+CMS](http://wiki.rubyonrails.org/rails/pages/Ruby+on+Rails+based+CMS)

Hi Joe,  
yes, I will add it as soon as I have uploaded it to RubyForge.

Alexander,  
Yes, it was a typo. In page\_elements\_controller, change  
render\_component\_to\_string to render\_component\_as\_string.

I did some other minor changes, you can get the newest package at  
[http://www.flowdev.de/adminpages\_0.2.1.tar.gz](http://www.flowdev.de/adminpages_0.2.1.tar.gz)

---

<div class="post-metadata">

**Author:** ![msojka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@msojka](https://www.ruby-forum.com/u/msojka)\
**Post date:** [March 10, 2006, 1:11am UTC](https://www.ruby-forum.com/t/new-ajaxy-cms-on-rails-adminpages/78596/6 "2006-03-10T01:11:47Z")

</div>

Martin S. wrote:

> hey, i’ve created a basic content management system using rails and  
> scriptaculous. I posted a first version last week, but I heavily  
> extended it since then.
> 
> Features:  
> Pages are arranged in a sortable tree (sortable by drag and drop)  
> Pages have “nice” URLS (no /index?articleid=97361496 or something)  
> Cacheing on page basis  
> every page has a layout with a number of columns  
> page elements can be put into the columns by drag and drop (sortable  
> lists)  
> Each page element has its own view and controller. Up to now I have  
> created Title, raw HTML, rich text editor and rails component, but  
> adding your own elements should be easy
> 
> You can check it out under [http://adminpages.flowdev.de](http://adminpages.flowdev.de)
> 
> Source: [http://www.flowdev.de/adminpages\_0.2.tar.gz](http://www.flowdev.de/adminpages_0.2.tar.gz)
> 
> Of course there are many rough edges, but come on, second version!
> 
> And yes, it is BSD licensed. I would love it if any of you are  
> interested in joining me in the development. Mail me, then I will put it  
> on rubyforge
> 
> Cheers,  
> Martin (Username wooyay on #rubyonrails)

I took a look at your cms. It would be great if there was a way to  
define the relative position of the columns in the editor. Is that  
possible?

---

<div class="post-metadata">

**Author:** ![msojka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@msojka](https://www.ruby-forum.com/u/msojka)\
**Post date:** [March 10, 2006, 3:04am UTC](https://www.ruby-forum.com/t/new-ajaxy-cms-on-rails-adminpages/78596/7 "2006-03-10T03:04:40Z")

</div>

Looks pretty interesting - but I could use a couple sentences worth of  
documentation. A very short README file would do. I downloaded the tar  
file,  
created a mysql database, loaded the datamodel, and started Webrick.  
Then I  
couldn’t find any pages. After looking at your demo site, I deduced that  
I  
need /page/$STUB to find the pages I see in the database. That gives me  
the  
“show” part. But how do I find the admin pages to do editing? On your  
demo  
site, that’s what you get at /. Clearly that isn’t what you want on a  
real  
site, but reading routes.rb and poking around in app/views/ didn’t  
enlighten  
me about where to find the login and admin pages. Thanks,

---

<div class="post-metadata">

**Author:** ![msojka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@msojka](https://www.ruby-forum.com/u/msojka)\
**Post date:** [March 10, 2006, 1:20pm UTC](https://www.ruby-forum.com/t/new-ajaxy-cms-on-rails-adminpages/78596/8 "2006-03-10T13:20:12Z")

</div>

Cynthia K. wrote:

> Looks pretty interesting - but I could use a couple sentences worth of  
> documentation. A very short README file would do. I downloaded the tar  
> file,  
> created a mysql database, loaded the datamodel, and started Webrick.  
> Then I  
> couldn’t find any pages. After looking at your demo site, I deduced that  
> I  
> need /page/$STUB to find the pages I see in the database. That gives me  
> the  
> “show” part. But how do I find the admin pages to do editing? On your  
> demo  
> site, that’s what you get at /. Clearly that isn’t what you want on a  
> real  
> site, but reading routes.rb and poking around in app/views/ didn’t  
> enlighten  
> me about where to find the login and admin pages. Thanks,

Hi Cynthia,  
you probably downloaded the 0.2 version, I changed the routes.rb in the  
0.2.1 version. It now looks like this:

ActionController::Routing::Routes.draw do |map|  
map.connect “#{ADMIN\_PAGE\_DIR}/\*name”, :controller=\>‘view\_pages’,  
:action=\>'show\_page  
’  
map.connect ‘’, :controller =\> “admin\_pages”, :action=\>“edit\_pages”

map.connect ‘:controller/service.wsdl’, :action =\> ‘wsdl’  
map.connect ‘:controller/:action/:id’  
end

You are right, there is no documentation yet, but that will be my next  
step.  
I just received my Rubyforge account for the project, I will upload  
everything to the CVS later in the day. First I have to earn me some  
money 🙂  
Martin

---

<div class="post-metadata">

**Author:** ![msojka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5a626/32.png) [@msojka](https://www.ruby-forum.com/u/msojka)\
**Post date:** [March 11, 2006, 5:27pm UTC](https://www.ruby-forum.com/t/new-ajaxy-cms-on-rails-adminpages/78596/9 "2006-03-11T17:27:51Z")

</div>

OK, I have uploaded the project files to RubyForge.

The project page is [http://rubyforge.org/projects/adminpages/](http://rubyforge.org/projects/adminpages/)

So if you are interested in joining the project, drop me a note and I  
can add you as a developer.

The demo is still running at [http://adminpages.flowdev.de/](http://adminpages.flowdev.de/) .

What is coming next:  
Better integration with FCKeditor (upload images)  
RMagick integration - an element type image  
better cache clearing algorithm (at the moment the whole cache is  
cleared every time the page tree changes)  
A way to add custom data fields to page layouts (like header image or  
meta keywords or whatever)

I added a small readme. This is the text:

* * *

Adminpages Readme

Project description:

A content management system on Rails.  
Use it to administer design-heavy sites in a user-friendly way.  
Features:  
Manipulate pages and content with Drag n Drop,  
“Nice” URLs,  
Caching,  
FCKEditor,  
multiple columns per page,  
custom content types

Aims of the project:

- Create a system that can be used to add pages to a web site and add  
content to these pages.
- The interface should be usable by non-technical persons.
- Each page has a page layout. The page layout defines the content of  
the page, for example the number of columns, a header image and a page  
title. For each con  
tent element, the page edit mask should provide a way to change this  
element. The page layouts should be editable through the web mask, but  
maybe not by the end  
user
- Integrate a rich text editor. At the moment there is a content element  
which uses FCKEditor, but there is no way to upload images yet.
- Should work under Mozilla FireFox and IE6. Safari and Opera are a  
problem, because there are no rich text editors that support these  
browsers.

NOT aims of the project:

- change templates over the web interface. The adminpages interface is  
only for end users, not for designers or programmers
- add dynamic elements like comments or polls. Stuff like that can be  
integrated by adding a content element “render\_component”, which can be  
used to integrate  
dynamic stuff.
- Backwards-compability to ancient browser versions

INSTALLING

Create a new mysql database  
Import adminpages/db/development.sql to that database  
copy adminpages/config/database.yml.default to  
adminpages/config/database.yml and change the content

Get the FCKEditor from [WYSIWYG HTML Editor with Collaborative Rich Text Editing](http://www.fckeditor.net/download/)  
Uncompress the editor to adminpages/public. You should have a folder  
adminpages/public/FCKeditor

Edit the file adminpages/config/routes.rb to define the URL that will be  
used to access the pages.  
Default is /pages/.  
!!!Watch out:!!!  
Don’t mount the pages to the root of the web server or to an existing  
folder.  
The cache clearing algorithm would delete any content of these  
folders!!!

Starting the application: like any other rails app.

* * *
