Nodes as HTML pages on FUSE filesystem

Events happening in the community are now at Drupal community events on www.drupal.org.
Garrett Albright's picture

When I first started lobbying the company I work at to build more sites using Drupal, one of the toughest parts was explaining to our most senior designer - who at that point had been building sites using GoLive and/or Dreamweaver for about a decade - that these tools wouldn't work for editing content on Drupal sites. "Where are the HTML files?" he would ask. I would then explain to him about how content is stored on the database and inserted into template files and such, but it would mostly bounce off of him - "okay, but how do I edit the HTML files?"

Over the last couple of years, he's come to understand the system a little better, at least to the extent that there aren't HTML files that he can just open up and edit with Dreamweaver. However, I'm wondering if it may be possible to use a little behind-the-scenes trickery to make it so that, at least to a limited extent, he could use Dreamweaver to edit site content. Here's what I have in mind.

FUSE is a Unix tool which basically lets an application or script fake the existence of a filesystem. Operations to the filesystem - requests for a list of files, opening or saving of files, etc - are actually passed on through to the application underneath the fake filesystem, which responds appropriately. The fact that the user is not really using a real filesystem to manipulate files is not apparent to the user.

So we may be able to make a script which connects to a Drupal site and fetches a list of nodes. It then presents those nodes as HTML files on a fake filesystem. When a user opens an HTML file, the requested node page is rendered and returned, so the HTML code for that page is returned as the "file," just as if the user requested the node page in their browser (with the possible exception of some HTML comments inserted to delineate what bits of content correspond to which fields on the node editing form). The user then uses a WYSIWYG tool to edit the page and save it. The FUSE script sends the saved file back to the server, which finds the changes to the node content (possibly using the aforementioned HTML comments, assuming the WYSIWYG tool is smart enough to not strip them) and saves them to the database. The script could also provide the files directory so that users could easily upload pictures and use them in the HTML pages in a familiar way. And if the user deletes a page or creates a new one on the filesystem, a corresponding node in the Drupal database will be deleted or created.

Something like this may also be of use to those who don't use WYSIWYG tools, but still prefer to be able to edit content using a filesystem and their code editor of choice rather than a field in a web browser window.

Your thoughts?

Comments

My 2 cents

crea's picture

I would rather educate designers to work with templates, than implement such a monster system. Templates are very common these days, be it Drupal, or any other random CMF/CMS. It's very strange that a designer can't edit templates.

It's strange that a designer

Garrett Albright's picture

It's strange that a designer can't edit code? Do you know many designers?

Templates are meant to be like HTML

crea's picture

HTML is code too. Also it depends on type of designer. Some designers are HTML coders too. And if they can't edit (a) code, and only do stuff in Photoshop etc, they shouldn't touch HTML either.

But tools like Dreamweaver,

Garrett Albright's picture

But tools like Dreamweaver, which I mentioned in the OP, allow designers to create and edit web pages without actually knowing how to code, for better or for worse. Our designers use Dreamweaver for all of our non-Drupal sites. Yes, as a code-oriented guy, I don't like it either, but that's the reality.

Give him what he wants

mikeytown2's picture

He asked for html files... give him the boost module! lol ;)

Joking aside, interesting issue. I can't think of any good solutions ATM.

IMHO, the best option is the

pedrorocha's picture

IMHO, the best option is the designer understood that some things have changed in the last decade.

By the way, you can do it with WebDav(http://drupal.org/project/webdav)

Or maybe if you want a monster, you can use Alfresco(http://www.alfresco.com/) integration(http://drupal.org/project/alfresco). You can use it to create nodes inside Drupal and have them inside Alfresco automatically, becoming able to use WebDav and FTP that he provides.

Ah, drat. Looks like that

Garrett Albright's picture

Ah, drat. Looks like that WebDAV project beat me to the punch on this idea… and I bet their implementation is easier.

Though in my experience, Dreamweaver has pretty crappy WebDAV support, or really support for any network connection other than unsecure FTP…