Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: edit template files in an external text editor?
I’ve never had this kind of problem before. I think Matt’s right: you should contact your hosting provider.
Offline
Re: edit template files in an external text editor?
Can you chmod them to something writable?
Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker
Offline
#15 2008-11-19 17:48:54
- typenerd
- New Member
- Registered: 2008-11-18
- Posts: 5
Re: edit template files in an external text editor?
Matt, good idea; since I’ll be using this often I’m trying to avoid that step tho!
Are there any other ways to have templates point to external files? I’m surprised there isn’t an elegant solution for this.
Last edited by typenerd (2008-11-19 17:49:21)
Offline
Re: edit template files in an external text editor?
chmod-ing the directory one time should do it. No?
Offline
Re: edit template files in an external text editor?
Hi – I found this tip at hicksdesign
This seems to be an ideal solution as it works in auto loading any changes made to the external files.
I am assuming that this will work for all files: Forms, Pages, Style?
Jon Hicks cautions that this was only tried with version 4.3.0.
…. texted postive
Offline
#18 2011-01-03 09:19:07
- Dimitri
- Member
- From: Johannesburg
- Registered: 2010-10-31
- Posts: 129
Re: edit template files in an external text editor?
bici wrote:
Hi – I found this tip at hicksdesign
This seems to be an ideal solution as it works in auto loading any changes made to the external files.
I am assuming that this will work for all files: Forms, Pages, Style?
Jon Hicks cautions that this was only tried with version 4.3.0.
Hi, do you mean John Hicks only tried with 4.2 :)
Check my early post
<txp:way_too_cool />
Offline
Re: edit template files in an external text editor?
Jon Hick’s method is outlined on TXP Tips, and there was a subsequent follow up by Steffan Willams titled Static Textpattern Forms and Pages.
Might be helpful for you.
Offline
Re: edit template files in an external text editor?
Dimitri wrote:
bici wrote:
Hi – I found this tip at hicksdesign
This seems to be an ideal solution as it works in auto loading any changes made to the external files.
I am assuming that this will work for all files: Forms, Pages, Style?
Jon Hicks cautions that this was only tried with version 4.3.0.
Hi, do you mean John Hicks only tried with 4.2 :)
Check my early post
yes my mistake. He tried it with 4.2.0 only. But i used his method with 4.3.0 and the one Page i tried it with was working fine.
…. texted postive
Offline
Re: edit template files in an external text editor?
I don’t see many advantages and quite a few drawbacks to editing your Pages, Forms and Styles external to the Textpattern admin area. What we should work towards is to make editing our templates easier via the admin area. Larger textareas comes to mind, which I’ve done on my local install that I use for creating templates.
Keep in mind that most of my template code resides in forms, my pages are pretty static and small. So having access to form snippets in a text editor does me no good. About the only thing that a text editor would benefit me would be when I’m working on the style, but even then I can have a syntax highlighting text editor open along side my browser if I need to see nicely colored code.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
Re: edit template files in an external text editor?
hcgtv wrote:
I don’t see many advantages and quite a few drawbacks to editing your Pages, Forms and Styles external to the Textpattern admin area. What we should work towards is to make editing our templates easier via the admin area. Larger textareas comes to mind, which I’ve done on my local install that I use for creating templates.
Keep in mind that most of my template code resides in forms, my pages are pretty static and small. So having access to form snippets in a text editor does me no good. About the only thing that a text editor would benefit me would be when I’m working on the style, but even then I can have a syntax highlighting text editor open along side my browser if I need to see nicely colored code.
ME:
Well i agree that working natively would be the most elegant solution. I don’t know if this is possible, but could one have a Preferences Setting to access to the Forms/Pages as external files?
As for CSS, that is easy enough to set up as an external file and I have easily done that on every site I work on. In addition I store all my css/layout images outside the DB in an /assets/images/ directory.
Being able to load all the FORMS/PAGES files for editing via Coda/Espresso would be a huge productivity gain.
cheers
…. texted postive
Offline
Re: edit template files in an external text editor?
I use a text editor pretty exclusively for my Textpattern code, and cnk_versioning does the job for me. I’m ignorant of the drawbacks, but there are quite a few advantages for me: Say you edit your templates in TXP. After you save the files to view the changes, there’s no simple way to “Undo” and roll back to your previous version. Using cnk_versioning, you can edit a template file, save, reload the page in your browser to view the changes; if you don’t like it, you can go back to your text editor and use it’s “Undo/Redo” history to go back to an earlier rendition. Furthermore, you can keep your templates under version control, using whatever system you prefer, from something as simple as Dropbox to something as robust as Mercurial or Git.
I know it’s possible to modify Textpattern so that it can keep a version history of your articles and templates, but I can’t imagine a core solution that would be as flexible as cnk_versioning.
And since you don’t have to install or run cnk_versioning, you’re free to use Textpattern’s admin area if that’s your preference. What am I missing?
Offline
Re: edit template files in an external text editor?
johnstephens wrote:
I use a text editor pretty exclusively for my Textpattern code, and cnk_versioning does the job for me. I’m ignorant of the drawbacks, but there are quite a few advantages for me: Say you edit your templates in TXP. After you save the files to view the changes, there’s no simple way to “Undo” and roll back to your previous version. Using cnk_versioning, you can edit a template file, save, reload the page in your browser to view the changes; if you don’t like it, you can go back to your text editor and use it’s “Undo/Redo” history to go back to an earlier rendition. Furthermore, you can keep your templates under version control, using whatever system you prefer, from something as simple as Dropbox to something as robust as Mercurial or Git.
I know it’s possible to modify Textpattern so that it can keep a version history of your articles and templates, but I can’t imagine a core solution that would be as flexible as cnk_versioning.
And since you don’t have to install or run cnk_versioning, you’re free to use Textpattern’s admin area if that’s your preference. What am I missing?
ME: @John Well one major question/fear is this warning that comes with cnk: “Please use this with care! Your pages/forms/css will be deleted from the database, when you delete the corresponding files”
Have you had any issues with deleted files? The way you have described your work flow does make me want to try that as it seems to give me what i want: editing via textmate.
…. texted postive
Offline