Page 1 of 1

Override Question

Posted: Sun Jul 05, 2026 2:12 pm
by Mort_Lemur
I'm playing with changing a test site and so far have managed to do everything with zero core code changes.

However, there will come a time where this is not possible and I will need to change the code in a file. Now in this situation I understand that the file should first be copied to the same file structure in the templates/ override directory,which is great as the original code remains unchanged, and Phoenix uses the override version.

What then happens when a Phoenix update comes along which updates that file, or maybe even removes its requirement?

Im assuming that when updating that any changes in the override file would need to be done again to a copy of the new updated file?

Maybe I'm overthinking things

Re: Override Question

Posted: Sun Jul 05, 2026 2:20 pm
by tessthepup
Mort_Lemur wrote: Sun Jul 05, 2026 2:12 pm I'm playing with changing a test site and so far have managed to do everything with zero core code changes.

However, there will come a time where this is not possible and I will need to change the code in a file. Now in this situation I understand that the file should first be copied to the same file structure in the templates/ override directory,which is great as the original code remains unchanged, and Phoenix uses the override version.

What then happens when a Phoenix update comes along which updates that file, or maybe even removes its requirement?

Im assuming that when updating that any changes in the override file would need to be done again to a copy of the new updated file?

Maybe I'm overthinking things
If you look at templates/default as an example you will see that all files in there are files that can be overriden.

IMO and @burt will probably come along with a more definitive answer but I would say that the files that can be over ridden will most probably never be removed.

Re: Override Question

Posted: Sun Jul 05, 2026 2:25 pm
by burt
Overthinking. But thats not a bad thing, especially when starting out.
You're thinking about a hypothetical situation that may never affect you.

Could you give a more `concrete` example, of this "what if" situation -> it'll be a lot easier to then give a proper eaisly understandable answer.