2 of 6
2
Live Preview with Coda (and other IDEs)
Posted: 25 April 2007 08:44 PM   [ Ignore ]   [ # 19 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  116
Joined  12-16-2005

The only problem I’ve run into is editing a CSS file. I think the .php extension is the culprit. It’d also be nice to do a vertical split screen for use on larger monitors.

Profile
 
 
Posted: 25 April 2007 08:57 PM   [ Ignore ]   [ # 20 ]  
Lab Assistant
RankRank
Total Posts:  122
Joined  01-20-2003

Hold down ‘option’ when clicking split to do a vertical split and you can change the default in the preferences smile

Profile
 
 
Posted: 25 April 2007 09:14 PM   [ Ignore ]   [ # 21 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  116
Joined  12-16-2005

big surprise I swear I looked for that option. Thanks for pointing it out. smile

Profile
 
 
Posted: 25 April 2007 10:37 PM   [ Ignore ]   [ # 22 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  105
Joined  12-16-2002
Aelfinn - 25 April 2007 08:44 PM

The only problem I’ve run into is editing a CSS file. I think the .php extension is the culprit. It’d also be nice to do a vertical split screen for use on larger monitors.

There’s also a pref for it.

Profile
 
 
Posted: 26 April 2007 01:49 AM   [ Ignore ]   [ # 23 ]  
Summer Student
Total Posts:  9
Joined  04-24-2007

Unfortunately it seems that when you change the page in the preview, it stops auto-refreshing when you save - bummer.

Profile
 
 
Posted: 26 April 2007 08:22 AM   [ Ignore ]   [ # 24 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  863
Joined  04-17-2002

Thanks for this Derek.

I’m playing with the demo and am just about converted to editing templates as files. One thing for me though, I have an installation of EE for staging in a subdirectory which points to a sub-domain. How would I write the htaccess file for this? The example given doesn’t seem to work.

ie: my templates directory is     /public_html/beta/system/template_files

    my index.php is at /public_html/beta/index.php and my site is at http://beta.somesite.com

any help appreciated.


One thing I’ve noticed with this is that the ftp engine in Coda (they say it is the same as the forthcoming new version of Transmit) seems markedly faster than Transmit 3, the current version of that app.

 Signature 

antipodean.org | uptheduff.org

Profile
 
 
Posted: 26 April 2007 08:24 AM   [ Ignore ]   [ # 25 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  19293
Joined  06-03-2002

Tim, try the following (place this .htaccess inside your template_files directory):

RewriteEngine On
RewriteRule
^(.*)\.php$ /beta/index.php/$1 [L,R=301]
 Signature 
Profile
MSG
 
 
Posted: 28 April 2007 11:59 AM   [ Ignore ]   [ # 26 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  220
Joined  07-23-2005

Ding-dang-it.

Looks like us Windows monkeys have been pushed even farther behind the workflow curve.

These kind of tools are making me seriously consider buying a Mac and running Windows either on a separate machine or under Boot Camp or emulation.

I work almost exclusively with ExpressionEngine now and almost all the best resources discussed here are Mac-centric.

My $0.02

Philip Jones

 Signature 
Profile
 
 
Posted: 28 April 2007 12:05 PM   [ Ignore ]   [ # 27 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  19293
Joined  06-03-2002

No need for Boot Camp or emulation, you can run any number of Windows installations (or Linux, or whatever) using Parallels, which uses virtualization and not emulation.

 Signature 
Profile
MSG
 
 
Posted: 28 April 2007 07:29 PM   [ Ignore ]   [ # 28 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  848
Joined  04-24-2002

Visiluna, you can use my TextMate EE bundle with a Windows editor called E-TextEditor. I used WinRar to unzip the bundle. It’ll spit back a metric ton of errors, but will automatically rename the items creating the errors.

Once you’ve installed the bundle, it should work like it does with TextMate. That’ll give you snippets, code highlighting and online documentation lookup while you’re working on your EE templates.

 Signature 

chrisruzin.netTextMate EE BundlejEdit EE ModeSolspace
“The greatest barrier to success is the fear of failure.” - Sven Goran Eriksson

Profile
 
 
Posted: 28 April 2007 09:19 PM   [ Ignore ]   [ # 29 ]  
Administrator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  40207
Joined  05-14-2004

I use e-texteditor and Chris’ bundle and it works amazingly.  I had some problems because of WinRAR as Chris mentioned, but some jiggery pokery, and the help of a friend (who owed me way more than that wink ) got it going. wink

 Signature 
Profile
MSG
 
 
Posted: 29 April 2007 12:05 AM   [ Ignore ]   [ # 30 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  848
Joined  04-24-2002

What all did “jiggery pokery” encompass? It might be useful info for anyone else trying to use the bundle on Windows.

 Signature 

chrisruzin.netTextMate EE BundlejEdit EE ModeSolspace
“The greatest barrier to success is the fear of failure.” - Sven Goran Eriksson

Profile
 
 
Posted: 29 April 2007 06:25 AM   [ Ignore ]   [ # 31 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  863
Joined  04-17-2002
Derek Jones - 26 April 2007 08:24 AM

Tim, try the following (place this .htaccess inside your template_files directory):

RewriteEngine On
RewriteRule
^(.*)\.php$ /beta/index.php/$1 [L]

Thanks Derek, that worked nicely. One small issue is that the URL in the preview pane in Coda includes the system and template files directory (ie: http://www.somesite.com/system/template_files/weblog/index) but I can live with that.

This is working great. I think I may switch over to templates as files with this package.

 Signature 

antipodean.org | uptheduff.org

Profile
 
 
Posted: 29 April 2007 09:05 AM   [ Ignore ]   [ # 32 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  19293
Joined  06-03-2002

One small issue is that the URL in the preview pane in Coda includes the system and template files directory (ie: http://www.somesite.com/system/template_files/weblog/index) but I can live with that.

Right, Coda builds the path based on the FTP structure, so that is unavoidable.

 Signature 
Profile
MSG
 
 
Posted: 29 April 2007 09:47 AM   [ Ignore ]   [ # 33 ]  
Lab Assistant
RankRank
Total Posts:  122
Joined  01-20-2003

The code I posted earlier was specifically to get the previews to render at the right URLs, in your templates folder .htaccess file use:

RedirectMatch 301 /system/template_files/(.*)\.php$ /index.php/$1/

With adsense, analytics, etc. on every page the last thing I need is a duplicate copy of the entire site rendering inside the system/template folder cool smirk

Profile
 
 
Posted: 29 April 2007 09:56 AM   [ Ignore ]   [ # 34 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  19293
Joined  06-03-2002

Adding an R=301 or R=Permanent to the rule would do the same, and is a good idea, rish, so I will update my blog entry.

 Signature 
Profile
MSG
 
 
Posted: 30 April 2007 03:25 AM   [ Ignore ]   [ # 35 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  104
Joined  11-01-2002

This sounds very interesting. I’m using MAMP to run a development install locally, and am having trouble getting this to work. I don’t get a preview, only the raw HTML/PHP code when i try to preview the template files.

I probably need to tweak the rewrite rules, but I’m not “fluent in rewrite” smile

Here’s my setup, can anyone guide me in getting this to work?

Coda site is set up this way:
Root URL: http:///Applications/MAMP/htdocs/thomas
(that is where the EE install lives, and where the sites index.php file is.

Local Root: /Applications/MAMP/htdocs/thomas

EE is set up this way:
Template files are saved to: /Applications/MAMP/htdocs/thomas/system/template_files/
and EE creates folders inside that folder for each template group, e.g. “Weblog” and so on ...

The .htaccess file is placed in: /Applications/MAMP/htdocs/thomas/system/template_files/

So guys, how many errors have I made, and what do I need to correct, to get previews working with a MAMP install ... can it even be done? Oh, by the way, the MAMP server IS started, something I often forget smile

Profile
 
 
Posted: 30 April 2007 06:55 AM   [ Ignore ]   [ # 36 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  19293
Joined  06-03-2002

The HTML in your preview isn’t even rendering?  Can you take a screenshot, please?

 Signature 
Profile
MSG
 
 
   
2 of 6
2
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120505 Total Logged-in Users: 56
Total Topics: 126573 Total Anonymous Users: 39
Total Replies: 665457 Total Guests: 354
Total Posts: 792030    
Members ( View Memberlist )