views:

81

answers:

3

Hi, I'm looking for a HTML editor that kinda supports templated editing or live snippets or something like that.

Background: I'm working on a website for a friend. As there are no specifications what the webspace/webserver can or can't do, I decided to make it a pure HTML/CSS page, or rather 10 of them. I wrote a template, copied it 10 times and edited the content. And guess what, the template has to be changed.

Therefore I'm looking for a (HTML-)editor that has some kind of live template system where I can edit the content in as it where plain text and then save the project into the 10 pure HTML/CSS files.

I thought about using PHP (the only script language I've some knowledge in), but writing the underlying template script would cost me enough time that I could change all files by hand. I'm not that familiar with AJAX to know if there's a way to load content from another file. If so, this would be an option if there already is a script. With Webdeveloper (firefox extension) I could save the generated source code as HTML/CSS.

Thanks in advance

Edit: any hints how to do this without an editor are welcome

Edit2: In my mind the tool looks like a plain old text editor like SciTe, but capable of editing multiple files simultaneously in the same text area, so it looks like editing one ordinary file, but actually it's a whole bunch of files.

+1  A: 

I would have used a template engine. I wrote a post about a dead simple script using the Dwoo template engine and mod_rewrite, where I am taking the uri and loading the forrect data and template based on that. You should be able to get it running in a few minutes.

dr. squid
I would have too if I had known about the problems I would stumble upon. It was a very simple HTML template but since browser switches like <![if lt IE 7]> is HTML and not CSS, I need to change the HTML and CSS. And this is just one example.At this point, where most of the content is written, ripping out the parts and putting them in a template engine is a bit too much. But thanks for your reply.
DaClown
+1  A: 

Dreamweaver will do this for you, it's had HTML templating of the type your describe built in from very early versions (because from how you phrase the question I do not think you're thinking along the lines of a PHP templating engine such as Smarty, but some sort of HTML layout formating)

Although I regularly look around for Dreamweaver replacements, and I've certainly been impressed by Aptana, I still tend to use Dreamweaver in my development stack simply because whereas I can compensate for some of the more coding-orientated features it misses, I find the WYSIWYG nature of the editor invaluable.

Cruachan
I'm not that familiar with Dreamweaver, but the WYSIWYG editors I know (Frontpage, Netobjects Fusion) write extremly bad HTML with loads of <font> and whitespace or there unicode equivalent. Is Dreamweaver better then the editors I worked with?
DaClown
I don't know, because I work almost exclusively in the code editor part of Dreamweaver using the wysiwyg panel for previewing. I find it's just a lot faster and more integrated than using Aptana or whatever then previewing in a browser window. The latest version is pretty neat for editing css in a similar wysiwyg manner to html
Cruachan
+1  A: 

Maybe I am way off on this, but why don't you look into an Open Source Content Management System (PHP/MYSQL)? There are MANY light systems that are not like Drupal, Joomla (if you do not want the big bulk of those CMS's).

There are even a few good ones for light web design that are flat file driven.

That would be my suggestion, at least if not for this project, look into it for future projects.

Here is an example of a great micro CMS that would seem to fit the bill for what you are doing: http://www.mini-print.com/

Jakub
Problem is I've no idea what the webserver is capable of, not even if there's PHP available. But +1 for la.plume, it might come in handy for another project.
DaClown