ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Using Dreamweaver to edit "flat" files

August 18, 2010 2:20pm

Subscribe [3]
  • #1 / Aug 18, 2010 2:20pm

    django6

    124 posts

    I read the docs about saving the files as flat files. So I know there’s the possibility of editing the layout of templates in DW, but I’m wondering if anyone is doing this and/or if they can tell me some pros and cons. Here are some I can see.

    Pros:
    You can edit layout it a wysiwyg editor
    If someone is more comfortable with DW

    Cons:
    Doesn’t bring in database content
    configuring may be difficult
    Not sure if it will work with existing linking for css, images, videos, audio
    ftp uploading and downloading required

    I’m not sold on doing this, I just want to get some opinions so I can advise my client one way or the other.

  • #2 / Aug 18, 2010 6:31pm

    Green Egg Media

    111 posts

    django6 -

    To be honest, if you’re talking about doing everything as hard-coded content, then I wonder why you would even need EE to begin with. The whole point of EE is to allow you to create a template and populate that template with changing content that is store in the database. You could still use DW to achieve something like this, but it does mean that you would need to be comfortable with working in the HTML code generated by DW to add all of the EE tags.

    As for giving a client access to the templates via DW, I don’t necessarily think this is a great idea. We rarely give our clients access to the templates at all. One missed curly brace or stray div and they could bring down an entire site, or section of the site.

    Lance
    Green Egg Media

  • #3 / Aug 18, 2010 6:42pm

    django6

    124 posts

    Lance,

    Your assumptions are incorrect. If you re-read my post I listed a “con” as not being able to see the database content within dreamweaver. The “client” here is actually the guy who makes the websites and calls me when he gets stuck. He likes DW and wants a way to change his layouts within that program—not so much the db content. I think it’s more work than it’s worth, but perhaps someone is using this “flat file” function that’s built-in to EE successfully. There must be a reason that EE built this into its product. If someone has used it, please give me a review of this method and some pros and cons.

  • #4 / Aug 18, 2010 7:06pm

    Green Egg Media

    111 posts

    django6 -

    We use flat files for almost all of our projects. But there is no difference between the flat file and what would be displayed in the CP template manager. I did see the con that you listed, but it sounded like you were talking about using the flat file with content in it. Flat files do not contain any entry content. They are just a way to store your templates as files in the file system. This has many advantages, such as allowing you to use your favorite text editor with the templates, such as TextMate or Coda.

    You could open these in DW, but if you are taking advantage of any embeds for shared content (such as headers, navigation, footers), DW won’t render those correctly.

    Especially in EE2, there is no disadvantage to using flat files that I can see. The new Synchronize Templates feature means that you can choose to work in the CP or in the flat file. I suppose it could be argued that it is a “con” to have to Sync the templates, but for the flexibility it provides, that seems a worthwhile addition to a normal workflow rather than a drawback, per se.

    Lance
    Green Egg Media

  • #5 / Aug 18, 2010 8:23pm

    django6

    124 posts

    All of my sites use embeds for every repeatable static bit. The dynamic content stuff is all weblogs. The sites are all 1.x versions. The guy I built them for is now moved on to Wordpress, and is just looking to maintain them in a way he’s used to, i.e. dreamweaver. I actually have several sites where the template is just a single embed that calls a master template (or 2 or 3 master templates so I can have a few different layouts but not repeat any code) and then that template calls other embeds for nav, footer, header, etc.. I also have a lot of conditional stuff based on the url segments.

    It sounds like from what you’re saying if he creates flat files of these templates he’s going to be sorely disappointed because all of the content in those embeds would not show. Is that correct?  I was thinking there was some kind of mechanism that would assemble/disassemble all the html/css from the embeds when you uploaded/downloaded the flat file—so you could seamlessly go between the dynamic site and the static dreamweaver site. Minus the weblog content of course, but with all the layout in place. But it sounds like from what you are saying the feature is not that advanced.

  • #6 / Aug 18, 2010 8:35pm

    Green Egg Media

    111 posts

    django6 -

    Unfortunately, that’s not how the flat files work. There is no parsing of any kind in the flat files. They are literally identical replicas of what you would see in the CP Template Manager, just saved in the file system.

    Given the scenario you have outlined, it doesn’t sound like you would even be able to use DW to edit the flat files effectively.

    Lance
    Green Egg Media

  • #7 / Aug 21, 2010 4:04am

    Danny Veiga

    58 posts

    Yeah I don’t think there’s a magical button that’ll parse all the data from the weblogs and create static html pages - no CMS can do that as far as I know, I could be mistaken.

  • #8 / Aug 29, 2010 9:32pm

    actofmind

    2 posts

    django6 -

    To be honest, if you’re talking about doing everything as hard-coded content, then I wonder why you would even need EE to begin with. The whole point of EE is to allow you to create a template and populate that template with changing content that is store in the database. . . .

    As for giving a client access to the templates via DW, I don’t necessarily think this is a great idea. We rarely give our clients access to the templates at all. One missed curly brace or stray div and they could bring down an entire site, or section of the site.

    Lance
    Green Egg Media


    The new Dreamweaver CS5 allows one to work directly with CMS templates in the database live from within Dreamweaver. I know that it works with Joomla!, Drupal, and Wordpress. Does it work with EE? Apparently not. If not, please sell me on why I should purchase EE. It is a deal breaker for me.

    PS: Where did the “summer student” come from? There is no option in the control panel or profile to correct that. What a bizarre default, IMHO

  • #9 / Aug 29, 2010 9:49pm

    Lisa Wess

    20502 posts

    Welcome to the forums, actofmind.

    You can save templates as text files to edit them in your favorite HTML editor, Dreamweaver included.  There’s no need to have Dreamweaver talk to the database directly for this.  See saving templates to text files.

    “Summer Student” is simply a forum rank based on how many posts you have on our forums.  This is based on our “Lab” (EllisLab), and learning ExpressionEngine.

  • #10 / Aug 30, 2010 2:59pm

    actofmind

    2 posts

    Thanks Lisa for the link. I had already read that page for converting to flat files before posting yesterday.

    I see that as a workaround now that Dreamweaver has become more robust. My guess is that EE has its proprietary reasons for not allowing Dreamweaver to work with live templates. That is a company policy decision.

    Since Joomla! is a well established open source CMS that Dreamweaver CS5 has integrated into itself, the work flow becomes more streamlined. In addition, my web host gives technical support for Joomla!

    I am more a designer than a programmer, though do understand CMS design concepts, and like the idea of keeping the process as visual as possible.

    I was pretty sold on EE until I discovered CS5 capabilities. Now I wonder what the advantage is to paying a subscription for a proprietary CMS.  EE is an excellent product, don’t misunderstand me.

  • #11 / Aug 30, 2010 3:11pm

    Lisa Wess

    20502 posts

    Hi, actofmind - it’s not a workaround; it’s an excellent solution that works with all HTML editors rather than working specifically with one.  Furthermore, by saving templates as files it becomes possible to use them in a repo setup to have version control and tracking.

    I don’t use Dreamweaver and I don’t know how it taps into the database; it’s certainly possible that could be made to work with ExpressionEngine, and you’re welcome to post a feature request for the same.  What I am not seeing is why this is preferable to saving the templates as files and going that route.  It was made far more robust in EE 2, so that you can create files outside of EE and you don’t even need to go into the control panel at all, as well as adding a way to synchronize them back to the database for situations where you’re moving EE to another server. 

    This also means that you do not need to fiddle with the database to backup your templates, and you can move entire template sets to a new installation and immediately have your new templates usable on that site.  It’s pretty cool, actually. =)

    We do include technical support with ExpressionEngine as well, so you would be covered there by expert EE staff with direct access to the development team itself.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases