Forum Moderators: phranque

Message Too Old, No Replies

Not static, but not exactly dynamic either

The customer wants to add/edit pages later with Dreamweaver or Frontpage

         

MatthewHSE

7:17 pm on May 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For years now, I've coded everything in plain text. I had FrontPage once-upon-a-time, but have long-since uninstalled it and never missed it. Other than that, I've never really used WYSIWYG's and until now have never needed them.

But now, I have a client who owns Dreamweaver and FrontPage. He wants me to design a site for him and get it set up, but then he wants a copy of the "template" I use so he can add pages later himself. I see several hazards in this and would like some advice.

Normally, I'd set up a decent CMS and be done with it. But I think this man wants more control than what a CMS would provide him with, and besides, I think he really wants to be able to use the programs he's familiar with instead of trying to learn how to use a CMS.

I figured at first I could just give him the raw HTML of one of the pages, with no content in it. But then there are issues about how he'll want to add links to his new pages from the rest of the site, or if he uses text formatting that doesn't want to work with whatever CSS I set up, or uses images that are too large, or edits the main navigation on that page only, etc. Plus, I've seen firsthand how FrontPage mangles a nicely-coded HTML page, and I've heard that DW does about the same thing. So I'm a little hesitant about this option, as it seems to give too much control.

What would anyone suggest in a situation like this? Is there a system in Dreamweaver to set up templates that only allow edits in particular areas and within certain parameters? Or, is there any CMS that is more flexible than most? Are there other options I haven't mentioned?

Most sites I've designed for people have been very cut-and-dried. I either set up a few static pages or a full-fledged CMS and let it go. But with this one, it's not so basic as that. What can I do to give him the control he wants, without compromising the entire architecture of the site?

Thanks,

Matthew

rocknbil

12:39 am on May 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One solution, especially if you have any control over his FTP access,

1. Upload the template to the server.
2. Create an edit-only directory. The customer "user" can only access this directory.
3. The customer edits pages to his/her heart's content, and uploads them into this directory. At this point they're just white pages of content.
4. A cron job, which runs as root, comes along every five minutes or so, reads in the edit directory, inserts each page into your template, writes final html to domain root, and any files that don't exist in the edit dir. are deleted.

Here is why you want a cron job: anything run from the web, such as a "update pages" link, runs as Apache and you'll need to make the domain root world-writeable to create the final files. Definately not good. A program running as root works around this.

You just use some perl or php-magic to substitute the appropraiate sections out in your template:
<html><head><title> [PAGETITLE]</title></head><body>
<h3> [PAGETITLE] </h3> (or leave this part of content)
[CONTENT]
</body>
</html>

Reid

1:55 am on May 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The best thing I think is
1. Tell him you don't do Dreamweaver or Frontpage.
2. Write it in Dreamweaver or Frontpage.

No matter what you do as soon as he 'imports' it into one of these, the code is changed.
Also he will come back on you saying 'this happens with Frontpage or that happens with Dreamweaver' and you will be chained to one of those programs anyway.

As the site progresses or if there are any problems, DW and FP will have to be addressed - if thats what he's using.
Just tell him a 'better way to do it'

bill

5:57 am on May 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...ummm, doesn't sound like you've used the newer versions of FP or DW. The days of the spaghetti code from WYSIWYG are for the most part past us. I know from experience that FP2003 works fine with existing sites. It's very respectful of the code and doesn't alter anything unless told to by the user.

If your client wants to edit the site themselves just make sure they have the latest versions of the WYSIWYG. If your sites are static pages then you shouldn't have any major problems with them being edited by FP or DW.

createErrorMsg

3:00 pm on May 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your sites are static pages then you shouldn't have any major problems with them being edited by FP or DW.

All I would add to this is to check the template in DW (I don't know about FP) to make sure the CSS is translating into Design View. EVen with 2004MX, Design View doesn't always show you what you get with the CSS you use (sort of oxymoronic, given that it's a WhatYouSeeIsWhatYouGet Editor, but okay). This could prove problematic for your client when creating new pages or updating existing ones, especially if he is unfamiliar with CSS.

You can create templates in DW, and as long as the client opens an instance of the template, and not the template file, itself, DW will not let him alter the non-editable regions of the document. (I use DW to build static sites. First I create the template w/CSS in text editor. Then I use DW to establish the template and create static files based on it. I then import the static files back into a text editor and add content by hand. Using DW's templatizing allows for later editing of a single page that gets applied to all static pages associated with that template.)

cEM