1 of 2
1
New Extension: Templatizer
Posted: 18 May 2009 11:20 AM   [ Ignore ]  
Summer Student
Total Posts:  28
Joined  06-25-2007

Have you gotten sick of the workflow “create template -> save as file -> download from FTP”?
Do you wish you can just create a file, upload to FTP and have Expression Engine automatically recognize is it as a new template?

This is what this new extension does. After you install it, you can start your template’s lifecycle as a physical file, instead of as an entry in a database!
Guaranteed to shave of 34 seconds, of your precious time, or….I don’t know…just try it out!

File Attachments
ext.templatizer.zip  (File Size: 3KB - Downloads: 250)
 Signature 

http://www.aviblock.com

Profile
 
 
Posted: 18 May 2009 11:35 AM   [ Ignore ]   [ # 1 ]  
Professor
Avatar
RankRankRankRankRankRankRank
Total Posts:  10834
Joined  04-15-2006

Hiya,

I’m probably having an off day but I just downloaded this as it seems very interesting. I already had a site setup to save templates to a folder so I tried creating a new file in one of the already created folders but should I now be seeing that template showing up in my control panel as I’m not getting it showing.

Is there something I should do perhaps?
(I do have the extension enabled by the way wink )

Best wishes,

Mark

 Signature 

Shopping Cart Plugin
Full list of add-ons
———————————————————-
Buy me a drink, or two if you like!!

Profile
 
 
Posted: 18 May 2009 11:48 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  28
Joined  06-25-2007

Have you tried accessing it from your web browser? The main point of this is that you only have to create a template, and view it! In fact there should be little reason why you should ever need to view it from the control panel for purposes of editing it…especially since the default text area is not very conducive to editing templates (you can’t do basic things like hitting tab!).
Although to be honest there is an extension out there which alleviates some of these pains, called cm_template_editor, but nothing beats dreamweaver, textmate, notepad++, vim or whatever the heck you like to use for editing templates.

Thanks for trying it out though, and let me know if this helps!

 Signature 

http://www.aviblock.com

Profile
 
 
Posted: 18 May 2009 01:45 PM   [ Ignore ]   [ # 3 ]  
Professor
Avatar
RankRankRankRankRankRankRank
Total Posts:  10834
Joined  04-15-2006
blocka - 18 May 2009 11:48 AM

Have you tried accessing it from your web browser?

Yep I was right, I was having an off day grin

blocka - 18 May 2009 11:48 AM

The main point of this is that you only have to create a template, and view it! In fact there should be little reason why you should ever need to view it from the control panel for purposes of editing it…especially since the default text area is not very conducive to editing templates (you can’t do basic things like hitting tab!).
Although to be honest there is an extension out there which alleviates some of these pains, called cm_template_editor, but nothing beats dreamweaver, textmate, notepad++, vim or whatever the heck you like to use for editing templates.

There is also an extension that allows just for tabs too but this does look really quite useful, well done and thanks again.

Best wishes,

Mark

 Signature 

Shopping Cart Plugin
Full list of add-ons
———————————————————-
Buy me a drink, or two if you like!!

Profile
 
 
Posted: 18 May 2009 02:20 PM   [ Ignore ]   [ # 4 ]  
Professor
Avatar
RankRankRankRankRankRankRank
Total Posts:  10834
Joined  04-15-2006

Actually just noticed that once you’ve visited the template in the browser once then it appears in the control panel anyway so best of all worlds really wink

Fantastic little extension that one, well done again.

Best wishes,

Mark

 Signature 

Shopping Cart Plugin
Full list of add-ons
———————————————————-
Buy me a drink, or two if you like!!

Profile
 
 
Posted: 18 May 2009 02:48 PM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  587
Joined  07-14-2008

What happens in the situation when you delete a template (which was saved as a file after you created the template in CP) via CP then it still shows the file on the server, but does not display when you try to browse to the page, and it does not show up in the CP, does it automatically take that file and create the template within the cp?

Profile
 
 
Posted: 18 May 2009 02:55 PM   [ Ignore ]   [ # 6 ]  
Summer Student
Total Posts:  28
Joined  06-25-2007
Brad Morse - 18 May 2009 02:48 PM

What happens in the situation when you delete a template (which was saved as a file after you created the template in CP) via CP then it still shows the file on the server, but does not display when you try to browse to the page, and it does not show up in the CP, does it automatically take that file and create the template within the cp?

With this extension running, as long as the physical file exists on the file system, it will show up. This is because normally a template has to exist in the database for it to display. This extension merely inserts it into the database for you if the file exists.

 Signature 

http://www.aviblock.com

Profile
 
 
Posted: 18 May 2009 02:58 PM   [ Ignore ]   [ # 7 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  587
Joined  07-14-2008

My concern is, you know how you initially create the template in the cp template module, then save as a file?

It then shows up on the server where you can edit it in your editor of choice, which is great.

But when you delete that template via the cp within the templates module, it will not show up there anymore, but the hard file still displays on the server.

So my question is, once I delete the template from the cp, does it redisplay since the hard file exists on the server?

Profile
 
 
Posted: 18 May 2009 03:00 PM   [ Ignore ]   [ # 8 ]  
Summer Student
Total Posts:  28
Joined  06-25-2007
Brad Morse - 18 May 2009 02:58 PM

My concern is, you know how you initially create the template in the cp template module, then save as a file?

It then shows up on the server where you can edit it in your editor of choice, which is great.

But when you delete that template via the cp within the templates module, it will not show up there anymore, but the hard file still displays on the server.

So my question is, once I delete the template from the cp, does it redisplay since the hard file exists on the server?

All you have to do then is delete the file! I’m assuming if you have the ability to put it up there, you have the ability to take it down.

 Signature 

http://www.aviblock.com

Profile
 
 
Posted: 18 May 2009 03:04 PM   [ Ignore ]   [ # 9 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  587
Joined  07-14-2008

I do, but you said if the file exists on the server, it will turn it into a template within the cp templates module.

So will it recreate that template in the cp after I deleted it?

Or does it only create files into the cp template that were recently created on the server?

Profile
 
 
Posted: 18 May 2009 03:06 PM   [ Ignore ]   [ # 10 ]  
Summer Student
Total Posts:  28
Joined  06-25-2007
Brad Morse - 18 May 2009 03:04 PM

I do, but you said if the file exists on the server, it will turn it into a template within the cp templates module.

So will it recreate that template in the cp after I deleted it?

Or does it only create files into the cp template that were recently created on the server?

If you only deleted it from the control panel, it will be recreated the next time you go to that url.

If you deleted it both from the cp and the filesystem, it will not be resurrected.

 Signature 

http://www.aviblock.com

Profile
 
 
Posted: 18 May 2009 07:10 PM   [ Ignore ]   [ # 11 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1917
Joined  01-05-2007

Didn’t work for my unfortunately. I created some hidden templates and they didn’t show up.

 Signature 

 
Steven Hambleton | Follow me on Twitter!


ExpressionEngine Outsourcing for Marketing, Graphic & Web Agencies
Partner with a professional ExpressionEngine development team to turn your designs into functioning sites.

Profile
 
 
Posted: 18 May 2009 07:25 PM   [ Ignore ]   [ # 12 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2321
Joined  05-13-2004

I got it to work, but I dont’ see how this saves any time. Now I create the php file save it and then I have to go to my broswer and type in domain.com/index.php/template_group/template_name before it gets registered in the database… seems to me like it takes just about the same amount of time.

 Signature 

CreateSean Web Design | EE Forums 4 You ExpressionEngine forum customization
on twitter @CS_sean I am the poster formally known as The Linguist.

Profile
 
 
Posted: 18 May 2009 08:09 PM   [ Ignore ]   [ # 13 ]  
Summer Student
Total Posts:  28
Joined  06-25-2007
Sean C. Smith - 18 May 2009 07:25 PM

I got it to work, but I dont’ see how this saves any time. Now I create the php file save it and then I have to go to my broswer and type in domain.com/index.php/template_group/template_name before it gets registered in the database… seems to me like it takes just about the same amount of time.

The point is that you can get working on your template much quicker. The way I work, I rarely ever touch the templates in the CP. Certainly not for editing them. I work on my templates exclusively as files, so it’s a waste of time for me to go to the CP (also assumes i’m logged in…sometimes I don’t want to be logged in!), select the template group, make a template, put something in there and make sure “save as file” is selected, download from FTP, edit in notepad++.

That’s 6 steps to start working on my template.

As opposed to:

Create file locally. Upload. Browse. Get some more sleep….

 Signature 

http://www.aviblock.com

Profile
 
 
Posted: 18 May 2009 08:20 PM   [ Ignore ]   [ # 14 ]  
Summer Student
Total Posts:  28
Joined  06-25-2007
stinhambo - 18 May 2009 07:10 PM

Didn’t work for my unfortunately. I created some hidden templates and they didn’t show up.

This should work with hidden templates, but obviously they’re not going to show up since they’re hidden. But it should still create them (ie., they should still show up in the CP). Are they not showing up at all?

 Signature 

http://www.aviblock.com

Profile
 
 
Posted: 19 May 2009 07:41 AM   [ Ignore ]   [ # 15 ]  
Grad Student
Avatar
Rank
Total Posts:  51
Joined  09-11-2008

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

Profile
 
 
Posted: 19 May 2009 07:46 AM   [ Ignore ]   [ # 16 ]  
Summer Student
Total Posts:  28
Joined  06-25-2007
Martin Luff - 19 May 2009 07:41 AM

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.

 Signature 

http://www.aviblock.com

Profile
 
 
Posted: 19 May 2009 08:49 AM   [ Ignore ]   [ # 17 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  530
Joined  04-24-2004

Wow, I’ve wanted this forever! Creating templates in the CP first just seems like an exercise in redundancy. Thanks for releasing it!

 Signature 

lukestevensdesign.com · twitter.com/lukestevens · pro network member

Profile
 
 
Posted: 19 May 2009 08:58 AM   [ Ignore ]   [ # 18 ]  
Grad Student
Rank
Total Posts:  86
Joined  03-06-2007

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

Profile
 
 
   
1 of 2
1
 
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: 120498 Total Logged-in Users: 58
Total Topics: 126571 Total Anonymous Users: 33
Total Replies: 665449 Total Guests: 322
Total Posts: 792020    
Members ( View Memberlist )