Adva CMS / Section permalink problems / Fckeditor

4 views
Skip to first unread message

Alan Gutierrez

unread,
Mar 27, 2009, 3:44:28 PM3/27/09
to adva...@googlegroups.com
Day one implementing an application on Adva CMS. I'm porting the
website for the City of Yreka to Adva CMS. The current website is here.

http://ci.yreka.ca.us

It is hosted on a hand rolled CMS that is Apache Cocoon based.

My port is here.

http://yreka.blogometer.com

Rather than install the template plugin, I'm hacking an application
default.html.erb.

I managed to mash together the Fckeditor support in Adva with the
Fckeditor plugin provided by Scott Rutherford. This implementation
uses a different skin, Silver, that looks better in the Adva CMS admin
section.

Scott's implementation provides a controller for file upload, so I'm
able to upload images, browse images, etc. in Adva CMS. Now Adva CMS
is comparable to any of the PHP implementations that I've evaluated. A
visual editor is a key feature for my projects.

I did need to hack the configuration, and in the process, I removed
the iconless "Cell" button from the toolbar. I'm not sure what "Cells"
are and would be happy to read up on documentation to understand them.

Here are some issues so far:

I'll be implementing Adva's events calendar.

The home page of Yreka will probably have a special template and
controller, since it appears to be aggregating from the events calendar.

The menu and breadcrumb link to a "Section". It is important that I
preserve the current hierarchy of the Yreka website. I'm linking to a
section by generating a link using the self_and_ancestors property of
a Section. This is because link_to_content links to an article in the
section.

Each of the content sections has different heading photograph that is
part of template. Currently, I have an ugly switch statement in the
default template that tests the top level section and if the URL
peramlink is "city" for example, it displays the photo header for the
"city" section of the website. It would be much nicer to make the
photograph a property of the section, by attaching it as meta data, a
property, or some such.

It seems that the "administration" permalink generates an error
because I can rename it to "snert" and the /city/administration
section will not error out.

http://yreka.blogometer.com/city/administration

There are some content elements that cannot easily be created in the
FCKEditor that would be a good candidate for "Cells", if they are what
I think they are, so I'm eager to develop that concept.

Alan Gutierrez

Clemens Kofler

unread,
Mar 28, 2009, 7:24:38 AM3/28/09
to adva-cms
Hi Alan,

thanks for taking the time to write such extensive feedback.

Since I've been the one to implement FCKeditor in adva-cms and also
the Cells integration for it, let me give you an overview of what
Cells are and what they do.

First of all, you should probably read the Cells readme (http://
github.com/apotonick/cells/tree/master) where its author Nick explains
some basics. In short, they are an improved implementation of the pre-
Rails 2 components which are basically views with their own bits of
logic in them. In adva-cms, we use Cells to create teaser-like
functionality, i.e. we use them to aggregate contents. For example,
think of a "standard" homepage where you list the latest articles, the
newest forum posts, the last users that have registered etc. (call it
a "portal" if you are very 1995 ;-)). You can then create Cells for
these homepage elements (or use exising ones from adva-cms) and use
them in the Home section article. We chose an XML-style implementation
for this that gets passed to a content filter that acts similar to for
example a Textile/Markdown filter.

Example:
Welcome to our great website *blablabla*
<h3>Newest users</h3>
<cell name="user/recent" count="5" />
<h3>Latest tips and tricks</h3>
<cell name="article/recent" section="tips_and_tricks" count="10" />
...

The content filter then replaces these XML snippets with actual
content from the referenced objects.

adva-cms puts a layer on top of Cells that acts similar to other
objects in adva-cms in that it tracks referenced objects so that
caches can be expired correctly. For example, in the above code the
user cell would track the contents of @users (e.g. all registered and
activated users) and expire all pages that contain this Cell if a new
user signs up and activates their account.

The FCKeditor integration hooks into adva-cms and looks up which Cells
are present and exposes their states and forms to the editor so you
don't have to write the XML yourself. We do this by checking the
object tree for children of the BaseCell class and reading their
states (= instance methods). Each state carries its view plus a view
with the same name that carries the form so the user can select
appropriate parameters. This implementation isn't finished yet (not
only because of the missing icon) so bear that in mind if you want to
use it. At some point we definitely want to also allow file uploads
via FCKeditor but this needs to be integrated in our whole asset
machinery and we didn't have the time (or need) to do that just yet.

I hope this clarifies the role of Cells in adva-cms. Feel free to ask
if you still have questions.
- Clemens

nachokb

unread,
May 15, 2009, 10:30:14 AM5/15/09
to adva-cms
On Mar 28, 8:24 am, Clemens Kofler <clem...@railway.at> wrote:
> I hope this clarifies the role of Cells in adva-cms. Feel free to ask
> if you still have questions.
> - Clemens

Excellent writeup, thanks!

-- nachokb
Reply all
Reply to author
Forward
0 new messages