Sounds interesting, and thanks for creating this. I have one question: if the main objective is to speed things up then why not just use ‘It’s All Text!’ plugin for firefox - which permits you to open the contents of any textarea in your favourite editor; then when you hit save, it automatically updates the text window - https://addons.mozilla.org/en-US/firefox/addon/4125
Just a thought. Of course your plugin would permit the templates to be managed via CVS or similar which I guess could have some advantages…
All the best
Sounds interesting, and thanks for creating this. I have one question: if the main objective is to speed things up then why not just use ‘It’s All Text!’ plugin for firefox - which permits you to open the contents of any textarea in your favourite editor; then when you hit save, it automatically updates the text window - https://addons.mozilla.org/en-US/firefox/addon/4125 Just a thought. Of course your plugin would permit the templates to be managed via CVS or similar which I guess could have some advantages… All the best
Interesting firefox extension. Thanks for showing me that.
Even using that though, there’s still some “overhead” in having to actually go to the CP to create the template in the first place.
And of course as you mentioned, version control! On all by big EE projects, I do use subversion, so for me, as far as I’m concerned, the templates should only need to exists in the filesystem!
But I believe this certainly offers its own advantages, even if you’re only using one server with direct FTP access.
At first I could not get this extension to work, either on my MAMP development environment or the testing area of my production server.
I was going to delete the extension but decided to make a few changes to a post that required a clearing of the EE caches, and voila, the extension started working.
I think this is a great little extension. As the author points out, it is not going to save you a great deal of time, but it does cut down on the number of steps involved and the number of windows that have to be switched to set up a template.
For that alone Blocka thank you. I now have an extra 30 seconds to procrastinate about my next task…
[Added]
What would be a nice addition if at all possible is to have the extension recognise the default template group.
As it stands on my system, for the extension to pick up a template in the root (example.com/templatizertest) I have to run it through example.com/default_template_group/templatizertest , however for the extension to acknowledge a template in the ‘features’ template group all that is needed is example.com/features/templatizertest
I actually think this is a really neat extension. I mean once you have created the template either as a file or in the control panel you will still need to go to the template in a browser whether it exists or not to be able to see what you’ve done.
If it doesn’t exist because you are saving as files then this extension makes it really really easy as you just visit the page and hey presto there it is! 😊
Also could be very very useful if people create site templates and want to share them or use them very quickly on a new site. All you have to do is enable templates as file saving, install the extension and upload the templates!
Simple, neat and very very effective.
A definite thumbs up from me on this one.
Best wishes,
Mark
Even using that though, there’s still some “overhead” in having to actually go to the CP to create the template in the first place. And of course as you mentioned, version control! On all by big EE projects, I do use subversion, so for me, as far as I’m concerned, the templates should only need to exists in the filesystem!
@blocka - good points and it always seems a bit unnatural to have them in the db - handy some times if you need to do an urgent fix and can’t work on files locally.
Will definitely take a look at this. (Thanks for the extra points too Mark - I’ve been using eeSiteKit for experimenting with the idea of setting up part-built sites to cut down on initial dev but this would seem to offer the same possibilities; as you point out).
One other question I’ve not really thought enough about is, broadly speaking, how does it affect a site’s performance to have the templates in the db compared to on disk? I’m assuming that it’s going to be worse if they’re in the db because not only do you have the db queries to pull them out but then I guess you have to render more than if they’re on disk already? Although I guess caching evens that out? Just a thought…
Thanks again for creating the extension… interesting stuff.
One other question I’ve not really thought enough about is, broadly speaking, how does it affect a site’s performance to have the templates in the db compared to on disk? I’m assuming that it’s going to be worse if they’re in the db because not only do you have the db queries to pull them out but then I guess you have to render more than if they’re on disk already? Although I guess caching evens that out? Just a thought…
Handling Extreme Traffic with EE under Disk i/o section.
“Likewise, saving templates as files can marginally increase disk i/o as each template must be retrieved from disk in addition to the standard database query responsible for managing your template’s meta data (access, PHP parsing, template type, etc.).”
Highly recommend reading through the rest of the disk i/o section, even for smaller sites if your site is housed on any type of load-balanced/grid/cloud type hosting solution.
Installed, enabled, experimented, thought “nice tool”! went and did something else for a few hours.
This afternoon I had in excess of 2,000 copies of my comments template in my main template group. I’d had it set to “save template as file” from some time back.
Did I miss a step somewhere?
[Added] What would be a nice addition if at all possible is to have the extension recognise the default template group. As it stands on my system, for the extension to pick up a template in the root (example.com/templatizertest) I have to run it through example.com/default_template_group/templatizertest , however for the extension to acknowledge a template in the ‘features’ template group all that is needed is example.com/features/templatizertest
That’s something I thought about also, and when I get the time, I’ll definitely add that in!
Sounds like a great extension, and at the same time I discovered the CM Template Editor extension ! I’ll probably give it a try later. Thanks!
I would just like to add another template editing option in the mix, just as a suggestion. As a number of us use Firefox for development, I installed the “It’s all text!” addon, and set it to open an external editing app when I’m in a textarea (the template textarea in the CP, for example).
Alright, so I admit I’m still switching between two apps (browser and editor), and clicking “Update” is an extra step above this extension. But I don’t need to worry about old templates reappearing in the CP if I left them on the server. Just thought it might come in handy for some.
Thanks for your efforts. I find the template creation process really slow, and this does speed it up. Many of my sites use a very similar base template set, so this should help rolling out a pre-baked initial template set much quicker.
Apparently EE 2.0 will solve this, but the 1.6 branch will be around for a while, so thanks again for your efforts!
This extension is the greatest when converting an existing site over to templates to make the pages all dynamic!
To test this out, I created the EE version of the site on my local test server and used Dreamweaver’s site-wide search and replace tools along with this fantastic new new new extension.
Templatizer allowed me to make php-renamed copies of all the html files and then copy them into a templates folder (which had to live just below the EE system folder – in my case and most that means in the root, i.e. root/templates).
Upon the page being visited in a browser, these php files automatically become templates as per Templatizer’s design. That, of course, is very nice. And now I’m all set up for the save-as-template editing features without having had to go check a bunch of “save as template” check boxes.
But the best thing about this is that massive batch updates done via Dreamweaver’s search and replace (or any other powerful editor with site-wide or folder-wide search and replace functions) are rendered immediately upon merely visiting a template. The search and replace functions are far more powerful in Dreamweaver, for instance, than they are in EE’s control panel, too. What a cool tool he’s created here in this Templatizer! It makes it so easy to do site conversions, and encourages starting right out from the get-go using the save-as-templates features!
So, the entire site is ExpressionEngine-ized now, and it took a fraction of the time, since all I had to do besides designate the location of the templates folder and turn on the save-as-templates in global preferences was to change the html files I’d copied into my templates folder to end in .php instead (well, and of course, a bunch of search-and-replace changes to paths, mostly adding ../../ to image and media paths to point to the root’s various assets).
In this experiment I kept the structure very simple, putting all these templates into the site template group. I did notice that http://mysite.com/index.php didn’t seem to load the default site index (had to be spelled out as http://mysite.com/index.php/site/index) in order for the paths to the css and images to work. Couldn’t understand why that was.
Thanks for a very nice extension that will make site conversions a bit easier and encourage using external editors a bit more (though I am also a HUGE fan of It’s All Text for Firefox also.) Check out this post on two ancillary extensions you all will really love, as well as the link to It’s all Text.
Terry Leigh Britton
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.