Saturday, March 31, 2007

Saving EE Templates To Files

I remember being able to save my MovableType files as external docs on my server so I wouldn't have to edit them in the the program's editor. It's one of the things I've always been meaning to see if it could be done in Expression Engine because I hate working on my templates in the editor with a passion. I think it's one of the reasons I haven't really been working on my sites. I'd much rather work in BBEdit (my mac text editor of choice) and have the proper outline format and be able to see the color coding. Makes it a heck of a lot easier to spot problems, let me tell you! Instead of just figuring it out a long time ago, I've been copying from the editor, pasting into BBEdit, making changes, copying it back into the editor — not the most efficient workflow. Anyway, I was working on couple of friends' Wordpress templates the last few days and I was tinkering with their files on my own test server via my FTP program (Transmit) and BBEdit. So much easier! I decided today I was going to figure out how to make that happen in EE or I was going to dump the platform.

Fortunately, there is indeed a way to Save Templates as Text Files. The hardest part was figuring out what my server path was. I uploaded a page called pathinfo.php into the root of the site with this code: <?php phpinfo(); ?> and loaded the page. Down at the bottom was my server path. Yay! So, now I can code directly from BBEdit via Transmit. It is done and one more thing I've been putting off for so long is crossed off my list. Now it's late, but I'll get to working on my new design first thing in the morning.