Modules vs. updates...

flasht

Joined: 2004-08-30
Posts: 53
Posted: Mon, 2005-01-24 21:25

Ok. I was just wondering... It is said that when u put a .tpl file into ./local dir it wont be overwritten in update... Ok... but modules tempelates arent being updated???

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-01-24 21:42

Which modules templates aren't being updated? When aren't they being updated? Eh?

If you update from CVS or extract a new release or nightly snapshot into an existing installation it is possible that a file like modules/{modulename}/templates/{template}.tpl will get overwritten with a new file, erasing any changes you have made. A new release will never contain a templates/local/{template}.tpl file so any changes you make there will not be overwritten when you upgrade the code.

 
flasht

Joined: 2004-08-30
Posts: 53
Posted: Mon, 2005-01-24 21:47
mindless wrote:
Which modules templates aren't being updated? When aren't they being updated? Eh?

If you update from CVS or extract a new release or nightly snapshot into an existing installation it is possible that a file like modules/{modulename}/templates/{template}.tpl will get overwritten with a new file, erasing any changes you have made. A new release will never contain a templates/local/{template}.tpl file so any changes you make there will not be overwritten when you upgrade the code.

First of all i noticed that changing .tpl file in /local doesnt do anything. I have to change them directly...

And about my question... so what that local wont be overwritten when it will contain OLD vertsion of tempelate?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-01-24 22:36

local/{name}.tpl should be used instead of {name}.tpl when it is found and readable.

People care because they don't want to lose customizations. If changes are made directly then you may accidentally lose the work you did. With local templates you can upgrade the code and then do diffs between the newly updated file include with G2 and your local copy to merge together our changes with your customizations.