Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
What are the benefits of having templates in the database?
Just curious. What are the benefits of having the templating for TXP sites stored in a database vs editable in directories as wordpress does?
Art Rogue – Fine Art Photography
Offline
Re: What are the benefits of having templates in the database?
Pros:
- A single database backup contains most of your site info (bar images/files/custom scripts) so it’s fairly portable
- Linking pages to sections is easier in a DB than maintaining a directory tree or mixing DB calls with files which could go out of sync if permissions problems creep in
Cons:
- Database call is usually slower than reading a file directly
- No versioning out of the box
I’m sure other people can add other reasons to either camp.
Swings and roundabouts really. The DB approach does keep things simpler and in one place vs having to sync files via FTP when moving stuff from dev to live sites or making incremental changes, for example. But then you have to sync images/files anyway… *shrug*
For all other use cases there’s cnk_versioning of course :-)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: What are the benefits of having templates in the database?
can edit the layout any place anytime
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#4 2010-04-06 18:42:21
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: What are the benefits of having templates in the database?
Offline
Re: What are the benefits of having templates in the database?
That firefox extension isn’t working for me. Hummm….
Last edited by mattmikulla (2010-04-06 19:34:39)
Art Rogue – Fine Art Photography
Offline
#6 2010-04-24 06:54:37
- Niconemo
- Member
- From: Rhône-Alpes, France
- Registered: 2005-04-18
- Posts: 557
Re: What are the benefits of having templates in the database?
It’s working for me and it’s so cool for templates and style sheets !
Last edited by Niconemo (2010-04-24 06:54:59)
Nico
Offline
#7 2012-01-14 22:05:38
- markus_falk
- Member
- Registered: 2012-01-14
- Posts: 11
Re: What are the benefits of having templates in the database?
I think this is one of greatest misconceptions of txp … it annoys me to death working on those templates … I can’t agree on saying that this easier than deploying some template files via ftp to a server. Besides, my developement enviroment is local and there I would only have to edit template files.
I came across many systems like Contao, Typo3, Rails and all of them have files to edit. Maybe this is something TXP should adopt.
The proposed solution with the FF extensions sucks also because you have to open and close the same template file after every save. this is even more frustrating than copy and paste from editor to TXP.
Last edited by markus_falk (2012-01-14 22:05:49)
Offline
Re: What are the benefits of having templates in the database?
hi markus_falk.
There is this plugin: cnk_versioning
It will export pages & forms to files, and from that point, you will be able to edit them in a file editor, and also version them with your favorite SCM. Then, a simple refresh on your website (while in “Testing” mode), will “suck” the changes files into the database. Try it, you will love it.
Offline